Skip to content

Commit 150cb32

Browse files
Compatibility with package v2
Co-authored-by: Max Graey <maxgraey@gmail.com>
1 parent 9aa7928 commit 150cb32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/build-web.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export function buildWeb() {
1010
const mainVersion = pkg.version;
1111
// lockfileVersion 3 stores deps in packages["node_modules/..."]
1212
const binaryenVersion = pkg.packages["node_modules/binaryen"].version;
13-
const longVersion = pkg.packages["node_modules/long"].version;
13+
const binaryenVersion = pkg.packages["node_modules/binaryen"].version || pkg.dependencies.binaryen.version;
14+
const longVersion = pkg.packages["node_modules/long"].version || pkg.dependencies.long.version;
1415

1516
const distUrl = mainVersion === "0.0.0" ? `./` : `https://cdn.jsdelivr.net/npm/assemblyscript@${mainVersion}/dist/`;
1617
const binaryenUrl = `https://cdn.jsdelivr.net/npm/binaryen@${binaryenVersion}/index.js`;

0 commit comments

Comments
 (0)