Skip to content

Commit 75d257f

Browse files
authoredMay 23, 2022
Merge pull request #2959 from petschki/module-federation-version
Fix for webpack module federation "No version" error
2 parents da06656 + 46d77d3 commit 75d257f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎modules/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
"type": "module"
3-
}
1+
{"type":"module","version":"1.13.3"}

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@
8282
"prepare-tests": "npm run bundle && npm run bundle-treeshake",
8383
"minify-umd": "terser underscore-umd.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
8484
"minify-esm": "terser underscore-esm.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
85+
"module-package-json": "node -e 'console.log(`{\"type\":\"module\",\"version\":\"${process.env.npm_package_version}\"}`)' > modules/package.json",
8586
"build-umd": "npm run minify-umd -- --source-map content=underscore-umd.js.map --source-map-url \" \" -o underscore-umd-min.js",
86-
"build-esm": "npm run minify-esm -- --source-map content=underscore-esm.js.map --source-map-url \" \" -o underscore-esm-min.js",
87+
"build-esm": "npm run module-package-json && npm run minify-esm -- --source-map content=underscore-esm.js.map --source-map-url \" \" -o underscore-esm-min.js",
8788
"alias-bundle": "cpy --rename=underscore.js underscore-umd.js . && cpy --rename=underscore-min.js underscore-umd-min.js . && cpy --rename=underscore-min.js.map underscore-umd-min.js.map .",
8889
"build": "npm run bundle && npm run build-umd && npm run build-esm && npm run alias-bundle",
8990
"doc": "docco underscore-esm.js && docco modules/*.js -c docco.css -t docs/linked-esm.jst",

0 commit comments

Comments
 (0)
Please sign in to comment.