From 61ef56dcccd981aff0683a93b5ba764ab51947c2 Mon Sep 17 00:00:00 2001 From: Angelos Bouklis <53124886+ArjixWasTaken@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:01:47 +0300 Subject: [PATCH] chore: enable sourcemaps in dev --- electron.vite.config.mts | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/electron.vite.config.mts b/electron.vite.config.mts index 3229965c7d..4d5b549d89 100644 --- a/electron.vite.config.mts +++ b/electron.vite.config.mts @@ -51,6 +51,7 @@ export default defineConfig({ }; if (mode === 'development') { + commonConfig.build!.sourcemap = 'inline'; commonConfig.plugins?.push( Inspect({ build: true, @@ -98,6 +99,7 @@ export default defineConfig({ }; if (mode === 'development') { + commonConfig.build!.sourcemap = 'inline'; commonConfig.plugins?.push( Inspect({ build: true, @@ -148,6 +150,7 @@ export default defineConfig({ }; if (mode === 'development') { + commonConfig.build!.sourcemap = 'inline'; commonConfig.plugins?.push( Inspect({ build: true, diff --git a/package.json b/package.json index fe0b1a5b80..2890503df2 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "vite:inspect": "pnpm clean && electron-vite build --mode development && pnpm exec serve .vite-inspect", "start": "electron-vite preview", "start:debug": "cross-env ELECTRON_ENABLE_LOGGING=1 pnpm start", - "dev": "electron-vite dev --watch", + "dev": "cross-env NODE_OPTIONS=--enable-source-maps electron-vite dev --watch", "dev:debug": "cross-env ELECTRON_ENABLE_LOGGING=1 pnpm dev", "clean": "del-cli dist && del-cli pack && del-cli .vite-inspect", "dist": "pnpm clean && pnpm build && pnpm electron-builder --win --mac --linux -p never",