Skip to content

Commit

Permalink
[Tech] Source map support for the Backend (#3823)
Browse files Browse the repository at this point in the history
  • Loading branch information
CommandMC authored Jul 11, 2024
1 parent 00ce6fd commit 9c276a8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
6 changes: 3 additions & 3 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default defineConfig(({ mode }) => ({
input: 'src/backend/main.ts'
},
outDir: 'build/main',
minify: mode === 'production',
minify: true,
sourcemap: mode === 'development' ? 'inline' : false
},
resolve: { alias: srcAliases },
Expand All @@ -47,7 +47,7 @@ export default defineConfig(({ mode }) => ({
input: 'src/backend/preload.ts'
},
outDir: 'build/preload',
minify: mode === 'production',
minify: true,
sourcemap: mode === 'development' ? 'inline' : false
},
resolve: { alias: srcAliases },
Expand All @@ -62,7 +62,7 @@ export default defineConfig(({ mode }) => ({
target: 'esnext',
outDir: 'build',
emptyOutDir: false,
minify: mode === 'production',
minify: true,
sourcemap: mode === 'development' ? 'inline' : false
},
resolve: { alias: srcAliases },
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"shlex": "2.1.2",
"short-uuid": "4.2.2",
"simple-keyboard": "3.5.33",
"source-map-support": "^0.5.21",
"steam-shortcut-editor": "3.1.3",
"tslib": "2.5.0",
"xvfb-maybe": "^0.2.1",
Expand All @@ -124,6 +125,7 @@
"@types/react-router-dom": "5.3.3",
"@types/sanitize-html": "2.9.0",
"@types/semver": "^7.5.8",
"@types/source-map-support": "^0.5.10",
"@types/tmp": "0.2.3",
"@typescript-eslint/eslint-plugin": "5.47.1",
"@typescript-eslint/parser": "5.47.1",
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/backend/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
readdirSync,
readFileSync
} from 'graceful-fs'
import 'source-map-support/register'

import Backend from 'i18next-fs-backend'
import i18next from 'i18next'
Expand Down

0 comments on commit 9c276a8

Please sign in to comment.