diff --git a/.vscode/debug.script.mjs b/.vscode/.debug.script.mjs similarity index 88% rename from .vscode/debug.script.mjs rename to .vscode/.debug.script.mjs index 76a4351..b37a4ed 100644 --- a/.vscode/debug.script.mjs +++ b/.vscode/.debug.script.mjs @@ -7,7 +7,7 @@ import { build, createServer } from 'vite' const pkg = createRequire(import.meta.url)('../package.json') const __dirname = path.dirname(fileURLToPath(import.meta.url)) -async function startDebug() { +async function buildDebugApp() { const server = await createServer({ configFile: 'packages/renderer/vite.config.ts' }) await server.listen() @@ -39,9 +39,9 @@ async function startDebug() { function writeEnvLocal() { const envContent = Object.entries(pkg.env).map(([key, val]) => `${key}=${val}`) - fs.writeFileSync(path.join(__dirname, '.env'), envContent.join('\n')) + fs.writeFileSync(path.join(__dirname, '.debug.env'), envContent.join('\n')) } // bootstrap writeEnvLocal() -startDebug() +buildDebugApp() diff --git a/.vscode/launch.json b/.vscode/launch.json index a95c841..a53b0fc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "compounds": [ { "name": "Debug App", - "preLaunchTask": "start debug.script.mjs", + "preLaunchTask": "start .debug.script.mjs", "configurations": [ "Debug Main Process", "Debug Renderer Process" @@ -32,7 +32,7 @@ "--remote-debugging-port=9229", "${workspaceRoot}/dist/main/index.cjs" ], - "envFile": "${workspaceFolder}/.vscode/.env" + "envFile": "${workspaceFolder}/.vscode/.debug.env" }, { "name": "Debug Renderer Process", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 54cafb9..06b1774 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,10 +4,10 @@ "version": "2.0.0", "tasks": [ { - "label": "start debug.script.mjs", + "label": "start .debug.script.mjs", "command": "node", "args": [ - ".vscode/debug.script.mjs" + ".vscode/.debug.script.mjs" ], "isBackground": true, "problemMatcher": []