added build config

This commit is contained in:
srgooglo 2022-06-01 05:07:02 +02:00
parent bd844f7be8
commit 8cbd891993

View File

@ -41,29 +41,25 @@ module.exports = (config = {}) => {
}
}
// config.build = {
// sourcemap: "inline",
// target: `node16`,
// outDir: "dist",
// assetsDir: ".",
// minify: process.env.MODE !== "development",
// lib: {
// entry: "src/App.jsx",
// formats: ["cjs"],
// },
// rollupOptions: {
// external: [
// "electron",
// "electron-devtools-installer",
// ...builtinModules.flatMap(p => [p, `node:16`]),
// ],
// output: {
// entryFileNames: "[name].cjs",
// },
// },
// emptyOutDir: true,
// brotliSize: false,
// }
config.build = {
sourcemap: "inline",
target: `node16`,
outDir: "dist",
assetsDir: ".",
minify: process.env.MODE !== "development",
rollupOptions: {
external: [
"electron",
"electron-devtools-installer",
...builtinModules.flatMap(p => [p, `node:16`]),
],
output: {
entryFileNames: "[name].js",
},
},
emptyOutDir: true,
brotliSize: false,
}
return config
}