Skip to content

Commit

Permalink
Bundle napi-wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed Aug 20, 2023
1 parent ef114ec commit ef50a7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parcel/watcher",
"version": "2.3.0-alpha.2",
"version": "2.3.0-alpha.3",
"main": "index.js",
"types": "index.d.ts",
"repository": {
Expand All @@ -20,6 +20,7 @@
"index.js",
"index.js.flow",
"index.d.ts",
"wrapper.js",
"package.json",
"README.md"
],
Expand Down
2 changes: 2 additions & 0 deletions scripts/build-wasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fs.writeFileSync(`${dir}/npm/wasm/index.mjs`, js);

fs.copyFileSync(`${dir}/wrapper.js`, `${dir}/npm/wasm/wrapper.js`);
fs.copyFileSync(`${dir}/wasm/watcher.wasm`, `${dir}/npm/wasm/watcher.wasm`);
fs.cpSync(`${dir}/node_modules/napi-wasm`, `${dir}/npm/wasm/node_modules/napi-wasm`, {recursive: true});

let wasmPkg = { ...pkg };
wasmPkg.name = '@parcel/watcher-wasm';
Expand All @@ -38,6 +39,7 @@ wasmPkg.dependencies = {
'is-glob': pkg.dependencies['is-glob'],
'micromatch': pkg.dependencies['micromatch']
};
wasmPkg.bundledDependencies = ['napi-wasm']; // for stackblitz
delete wasmPkg.exports;
delete wasmPkg.binary;
delete wasmPkg['lint-staged'];
Expand Down

0 comments on commit ef50a7a

Please sign in to comment.