Skip to content

Commit b32c562

Browse files
authored
1 parent 31e194b commit b32c562

File tree

3 files changed

+11
-30
lines changed

3 files changed

+11
-30
lines changed

.erb/configs/webpack.config.renderer.dev.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,13 @@ const configuration: webpack.Configuration = {
172172
.on('error', (spawnError) => console.error(spawnError));
173173

174174
console.log('Starting Main Process...');
175-
spawn('npm', ['run', 'start:main'], {
175+
let args = ['run', 'start:main'];
176+
if (process.env.MAIN_ARGS) {
177+
args = args.concat(
178+
['--', ...process.env.MAIN_ARGS.matchAll(/"[^"]+"|[^\s"]+/g)].flat()
179+
);
180+
}
181+
spawn('npm', args, {
176182
shell: true,
177183
stdio: 'inherit',
178184
})

.vscode/launch.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"request": "launch",
88
"protocol": "inspector",
99
"runtimeExecutable": "npm",
10-
"runtimeArgs": [
11-
"run start:main --inspect=5858 --remote-debugging-port=9223"
12-
],
13-
"preLaunchTask": "Start Webpack Dev"
10+
"runtimeArgs": ["run", "start"],
11+
"env": {
12+
"MAIN_ARGS": "--inspect=5858 --remote-debugging-port=9223"
13+
}
1414
},
1515
{
1616
"name": "Electron: Renderer",

.vscode/tasks.json

-25
This file was deleted.

0 commit comments

Comments
 (0)