mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(electron): enable vscode debugger for electron (#9333)
This commit is contained in:
@@ -34,7 +34,12 @@ function spawnOrReloadElectron() {
|
||||
const ext = process.platform === 'win32' ? '.cmd' : '';
|
||||
const exe = resolve(rootDir, 'node_modules', '.bin', `electron${ext}`);
|
||||
|
||||
delete process.env['NODE_OPTIONS'];
|
||||
// remove import loader option
|
||||
const NODE_OPTIONS = process.env.NODE_OPTIONS;
|
||||
if (NODE_OPTIONS) {
|
||||
process.env.NODE_OPTIONS = NODE_OPTIONS.replace(/--import=[^\s]*/, '');
|
||||
}
|
||||
|
||||
spawnProcess = spawn(exe, ['.'], {
|
||||
cwd: electronDir,
|
||||
env: process.env,
|
||||
|
||||
Reference in New Issue
Block a user