From 5ad374b4b1d65239382d83680a41bd34814c0136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnlaugur=20=C3=9E=C3=B3r=20Briem?= Date: Fri, 24 Sep 2021 13:50:41 +0000 Subject: [PATCH] make build-wasm work also with patched wasm-pack The build-wasm script was failing if you had wasm-pack built with the patch in https://github.com/rustwasm/wasm-pack/pull/1061 because the "module" attribute would not be there --- so fix that by just hardcoding the filename. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a457ace..5355996 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "build-wasm": "wasm-pack build hi-wasm ; jq '. + {type: \"module\", main: .module} | del(.module)' hi-wasm/pkg/package.json | sponge hi-wasm/pkg/package.json", + "build-wasm": "wasm-pack build hi-wasm ; jq '. + {type: \"module\", main: \"hi_wasm.js\"} | del(.module)' hi-wasm/pkg/package.json | sponge hi-wasm/pkg/package.json", "dev": "next dev", "build": "next build", "start": "next start",