mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-08-29 16:37:55 +08:00
feat: add inspector node debug support
This commit is contained in:
@@ -23,7 +23,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
|
||||
|
@@ -11,7 +11,7 @@ export default defineConfig({
|
||||
formats: ['cjs'],
|
||||
fileName: () => '[name].cjs',
|
||||
},
|
||||
minify: false,
|
||||
minify: process.env./* from mode option */NODE_ENV === 'production',
|
||||
sourcemap: true,
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
|
@@ -11,6 +11,7 @@ export default defineConfig({
|
||||
formats: ['cjs'],
|
||||
fileName: () => '[name].cjs',
|
||||
},
|
||||
sourcemap: true,
|
||||
minify: process.env./* from mode option */NODE_ENV === 'production',
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
|
@@ -25,6 +25,7 @@ export default defineConfig({
|
||||
base: './',
|
||||
build: {
|
||||
emptyOutDir: true,
|
||||
sourcemap: true,
|
||||
outDir: '../../dist/renderer',
|
||||
},
|
||||
server: {
|
||||
|
Reference in New Issue
Block a user