Skip to content

Commit 8c3da8a

Browse files
committed
debug using esbuildkit loader
1 parent 27813a6 commit 8c3da8a

File tree

4 files changed

+47
-14
lines changed

4 files changed

+47
-14
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"name": "Bench",
1818
"request": "launch",
19-
"runtimeArgs": ["run", "bench:build"],
19+
"runtimeArgs": ["run", "bench:debug"],
2020
"internalConsoleOptions": "openOnSessionStart",
2121
"runtimeExecutable": "pnpm",
2222
"skipFiles": ["<node_internals>/**"],

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,4 @@ That said, there's learning here to improve performance of all the frameworks.
2828

2929
## Debugging
3030

31-
There are VS Code launch options to run test or bench in debug mode. Running bench in debug requires building first (and after any code changes).
32-
33-
```
34-
$ pnpm build
35-
```
36-
37-
To run the build version of bench through command line use:
38-
39-
```
40-
$ pnpm bench:build
41-
```
31+
There are VS Code launch options to run test or bench in debug mode.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "vitest",
8-
"build": "esbuild src/index.ts --external:v8-natives --bundle --format=esm --sourcemap --platform=node --outfile=dist/out.js",
9-
"bench:build": "node --allow-natives-syntax dist/out.js",
8+
"bench:debug": "node --allow-natives-syntax --loader @esbuild-kit/esm-loader src/index.ts",
109
"bench": "esbuild src/index.ts --external:v8-natives --bundle --format=cjs --platform=node | node --allow-natives-syntax"
1110
},
1211
"keywords": [],
@@ -30,6 +29,7 @@
3029
"usignal": "^0.9.0"
3130
},
3231
"devDependencies": {
32+
"@esbuild-kit/esm-loader": "^2.5.5",
3333
"@types/node": "^20.3.1",
3434
"esbuild": "^0.18.8",
3535
"rxjs": "^7.8.1",

pnpm-lock.yaml

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)