From d22104ed1233c834dfdc26ef5295eec9f2bbab68 Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 23 Jul 2022 17:12:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=F0=9F=90=9E):=20correct=20bootstrap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/.debug.script.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.vscode/.debug.script.mjs b/.vscode/.debug.script.mjs index a315617..2bd79e3 100644 --- a/.vscode/.debug.script.mjs +++ b/.vscode/.debug.script.mjs @@ -2,6 +2,7 @@ import fs from 'fs' import path from 'path' import { fileURLToPath } from 'url' import { createRequire } from 'module' +import { spawn } from 'child_process' const pkg = createRequire(import.meta.url)('../package.json') const __dirname = path.dirname(fileURLToPath(import.meta.url)) @@ -10,5 +11,8 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)) const envContent = Object.entries(pkg.env).map(([key, val]) => `${key}=${val}`) fs.writeFileSync(path.join(__dirname, '.debug.env'), envContent.join('\n')) +// For Debug +fs.writeFileSync(path.join(__dirname, '../node_modules/.electron-vite-debug'), '') + // bootstrap -import('../scripts/watch.mjs?debug=vscode') +spawn(process.platform === 'win32' ? 'npm.cmd' : 'npm', ['run', 'dev'], { stdio: 'inherit' })