diff --git a/bili.config.ts b/bili.config.ts index 7f7ca8b2..a7015f46 100644 --- a/bili.config.ts +++ b/bili.config.ts @@ -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 } } diff --git a/package.json b/package.json index 9dfcdc8c..1e95a79b 100644 --- a/package.json +++ b/package.json @@ -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",