chore: add debug mode for main process

This commit is contained in:
CallanBi committed 2022-02-24 18:38:43 +08:00
1 parent 2deb101c42
commit 3dc1bce537
9 files changed
+103 -12

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ async function createWindow() {
},
})
if (app.isPackaged) {
if (app.isPackaged || process.env['DEBUG']) {
win.loadFile(join(__dirname, '../renderer/index.html'))
} else {
// 🚧 Use ['ENV_NAME'] avoid vite:define plugin
+1
View File
@@ -12,6 +12,7 @@ export default defineConfig({
fileName: () => '[name].cjs',
},
minify: process.env./* from mode option */NODE_ENV === 'production',
sourcemap: process.env./* from mode option */NODE_ENV === 'debug',
emptyOutDir: true,
rollupOptions: {
external: [