Only load the necessary configs in the dev-runner (#3146)

This commit is contained in:
absidue 2023-02-04 08:04:44 +01:00 committed by GitHub
parent 3ca561c3e6
commit 0eeac4699b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,16 +9,23 @@ const kill = require('tree-kill')
const path = require('path')
const { spawn } = require('child_process')
const mainConfig = require('./webpack.main.config')
const rendererConfig = require('./webpack.renderer.config')
const webConfig = require('./webpack.web.config')
let electronProcess = null
let manualRestart = null
const remoteDebugging = process.argv.indexOf('--remote-debug') !== -1
const web = process.argv.indexOf('--web') !== -1
let mainConfig
let rendererConfig
let webConfig
if (!web) {
mainConfig = require('./webpack.main.config')
rendererConfig = require('./webpack.renderer.config')
} else {
webConfig = require('./webpack.web.config')
}
if (remoteDebugging) {
// disable dvtools open in electron
process.env.RENDERER_REMOTE_DEBUGGING = true