Skip to content

fix(q-p-w): Be explicit about the files and rm wasm-pack artifacts. #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions query-planner-wasm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This dist/ is also ignored by the root monorepo dist/
dist/

# This is unique to this package.
module/
15 changes: 11 additions & 4 deletions query-planner-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"scripts": {
"build-esm": "wasm-pack build --target bundler --out-dir module --out-name index --scope apollo",
"build-cjs": "wasm-pack build --target nodejs --out-dir dist --out-name index --scope apollo",
"remove-pkg-jsons": "rm module/package.json && rm dist/package.json",
"monorepo-prepare": "npm run build-esm && npm run build-cjs && npm run remove-pkg-jsons"
"remove-pkg-cruft": "rm module/package.json dist/package.json dist/.gitignore module/.gitignore dist/README.md module/README.md",
"monorepo-prepare": "npm run build-esm && npm run build-cjs && npm run remove-pkg-cruft"
},
"author": "[email protected]",
"license": "MIT",
Expand All @@ -26,13 +26,20 @@
"apollo"
],
"files": [
"dist/*",
"module/*"
"module/index_bg.wasm",
"module/index.js",
"module/index.d.ts",
"dist/index_bg.wasm",
"dist/index.js",
"dist/index_bg.js",
"dist/index.d.ts"
],
"main": "dist/index.js",
"exports": {
"require": "./dist/index.js",
"import": "./module/index.js"
},
"module": "module/index.js",
"sideEffects": "false",
"types": "dist/index.d.ts"
}