Skip to content

Commit

Permalink
Use tsc to build in order get working sourcemaps and stacktraces
Browse files Browse the repository at this point in the history
  • Loading branch information
eriksson-daniel committed Nov 21, 2024
1 parent 25d97e6 commit 6f2ad80
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ENV NPM_CONFIG_CACHE=/tmp
WORKDIR /usr/src/app

COPY server/dist server/dist
COPY server/node_modules server/node_modules
COPY frontend/dist/index.html frontend/dist/index.html

WORKDIR /usr/src/app/server
Expand Down
Binary file modified server/bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "module",
"scripts": {
"start": "bun run build --watch & NAIS_CLUSTER_NAME=local node --watch --trace-warnings dist/server.js",
"build": "bun build ./src/server.ts --target node --format esm --sourcemap --outdir dist",
"build": "tsc --outdir dist --sourcemap && tsc-alias -p tsconfig.json --resolve-full-paths",
"typecheck": "tsc --noEmit",
"lint": "biome check"
},
Expand All @@ -28,6 +28,7 @@
"@biomejs/biome": "1.9.4",
"@types/bun": "1.1.13",
"@types/node": "22.9.0",
"tsc-alias": "1.8.10",
"typescript": "5.6.3"
}
}
2 changes: 1 addition & 1 deletion server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"module": "ESNext",
"moduleDetection": "force",
// Bundler mode
"moduleResolution": "Bundler",
"moduleResolution": "node",
// Best practices
"strict": true,
"skipLibCheck": true,
Expand Down

0 comments on commit 6f2ad80

Please sign in to comment.