-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stress: remove custom loader and use esbuild to build (#581)
Closes #542 --------- Co-authored-by: texuf <[email protected]>
- Loading branch information
1 parent
5fd3f8a
commit 44fce31
Showing
7 changed files
with
72 additions
and
138 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { build } from "esbuild"; | ||
import { wasmLoader } from "esbuild-plugin-wasm"; | ||
|
||
build({ | ||
entryPoints: ["./src/start.ts", "./src/demo.ts"], | ||
bundle: true, | ||
sourcemap: "inline", | ||
platform: "node", | ||
target: "node20", | ||
format: "cjs", | ||
outdir: "dist", | ||
outExtension: { ".js": ".cjs" }, | ||
plugins: [wasmLoader()], | ||
ignoreAnnotations: true, | ||
assetNames: "[name]", | ||
loader: { | ||
".ts": "ts", | ||
".wasm": "file", | ||
}, | ||
}).catch((e) => { | ||
console.error(e); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,14 @@ | |
"version": "0.0.1", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"build": "yarn typecheck && yarn build-esbuild", | ||
"typecheck": "tsc --noEmit", | ||
"build-esbuild": "node esbuild.config.mjs", | ||
"lint": "eslint . --ext .ts", | ||
"my-jest": "NODE_TLS_REJECT_UNAUTHORIZED=0 yarn node -r ../../scripts/node-no-warn.js --experimental-vm-modules $(yarn bin jest)", | ||
"my-node": "node -r ../../scripts/node-no-warn.js --experimental-loader ./custom-loader.mjs", | ||
"start": "yarn my-node ./dist/start.js", | ||
"demo": "yarn my-node ./dist/demo.js", | ||
"start": "node ./dist/start.cjs", | ||
"demo": "node ./dist/demo.cjs", | ||
"test:ci:with-entitlements": "RIVER_ENV=local_single PROCESS_INDEX=0 DEBUG='stress:*,csb:enc*,csb:dec*' DEBUG_DEPTH='10' yarn my-jest" | ||
}, | ||
"dependencies": { | ||
|
@@ -37,6 +35,8 @@ | |
"@types/node": "^20.5.0", | ||
"@typescript-eslint/eslint-plugin": "^6.10.0", | ||
"@typescript-eslint/parser": "^7.14.1", | ||
"esbuild": "^0.21.5", | ||
"esbuild-plugin-wasm": "^1.1.0", | ||
"eslint": "^8.53.0", | ||
"eslint-import-resolver-typescript": "^3.5.5", | ||
"eslint-plugin-import": "^2.27.5", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters