Skip to content

Commit

Permalink
libsql-client-wasm: Fix bundled dependencies
Browse files Browse the repository at this point in the history
As it turns out, `npm` does not actually bundle dependencies if you're
using workspace...

npm/cli#3466

Let's work around that by manually copying `node_modules` in pre-build
step.
  • Loading branch information
penberg committed Jan 29, 2024
1 parent 8108079 commit a0a82f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/libsql-client-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
],
"scripts": {
"prepublishOnly": "npm run build",
"prebuild": "rm -rf ./lib-esm",
"prebuild": "rm -rf ./lib-esm && npm run bundle",
"build": "npm run build:esm",
"build:esm": "tsc -p tsconfig.build-esm.json",
"bundle": "rm -rf node_modules && mkdir -p node_modules/@libsql/libsql-wasm-experimental && cp -R ../../node_modules/@libsql/libsql-wasm-experimental/* node_modules/@libsql/libsql-wasm-experimental",
"test": "jest --runInBand",
"typecheck": "tsc --noEmit",
"typedoc": "rm -rf ./docs && typedoc"
Expand Down

0 comments on commit a0a82f0

Please sign in to comment.