Skip to content

Commit b9a905b

Browse files
committed
build: fix npm package, redact postinstall script before npm publish
1 parent f914da7 commit b9a905b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
],
1515
"main": "target/wasm32-wasi/release/swc_plugin_add_import_extension.wasm",
1616
"scripts": {
17-
"prepublishOnly": "pnpm build:release && pnpm pkg:redact-engines",
17+
"prepublishOnly": "pnpm build:release && pnpm pkg:redact-engines && pnpm pkg:redact-postinstall",
1818
"postinstall": "cargo install cargo-run-bin && cargo bin --install",
1919
"build:release": "cargo prepublish --release",
2020
"pkg:redact-engines": "pnpm json -I -f package.json -e 'this.engines=undefined'",
21+
"pkg:redact-postinstall": "pnpm json -I -f package.json -e 'this.scripts.postinstall=undefined'",
2122
"test": "pnpm run test:lib && pnpm run test:e2e",
2223
"test:lib": "cargo test --release",
2324
"test:e2e": "pnpm build:release && pnpm test --filter=example-* --workspace-concurrency=1",

0 commit comments

Comments
 (0)