Skip to content

Commit

Permalink
fix(build): use .module.js instead of .mjs for esm bundle (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist authored and aleclarson committed Mar 13, 2019
1 parent 0e5ecc9 commit 8b33b98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions bili.config.ts
Expand Up @@ -18,6 +18,9 @@ const config: Config = {
if (format === "umd") {
config.output.minify = true
}
if (format === "esm") {
config.output.fileName = "[name].module.js"
}
return config
}
}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -4,9 +4,9 @@
"description": "Create your next immutable state by mutating the current one",
"main": "dist/immer.js",
"umd:main": "dist/immer.umd.js",
"module": "dist/immer.mjs",
"jsnext:main": "dist/immer.mjs",
"react-native": "dist/immer.mjs",
"module": "dist/immer.module.js",
"jsnext:main": "dist/immer.module.js",
"react-native": "dist/immer.module.js",
"types": "./dist/immer.d.ts",
"scripts": {
"watch": "jest --watch",
Expand Down

0 comments on commit 8b33b98

Please sign in to comment.