Skip to content

Commit

Permalink
fix: Fix importing ES module from Node.js (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Apr 4, 2022
1 parent 53c2f91 commit afaa9e7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
"version": "9.0.0-beta.1",
"description": "Create your next immutable state by mutating the current one",
"main": "dist/index.js",
"module": "dist/immer.esm.js",
"module": "dist/immer.esm.mjs",
"exports": {
".": {
"import": "./dist/immer.esm.mjs",
"require": "./dist/index.js"
},
"./*": "./*"
},
"umd:main": "dist/immer.umd.production.min.js",
"unpkg": "dist/immer.umd.production.min.js",
"jsdelivr": "dist/immer.umd.production.min.js",
"jsnext:main": "dist/immer.esm.js",
"react-native": "dist/immer.esm.js",
"jsnext:main": "dist/immer.esm.mjs",
"react-native": "dist/immer.esm.mjs",
"source": "src/immer.ts",
"types": "./dist/immer.d.ts",
"typesVersions": {
Expand All @@ -32,7 +39,7 @@
"watch": "jest --watch",
"coverage": "jest --coverage",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf ./coverage",
"build": "rimraf dist/ && tsdx build --name immer --format esm,cjs,umd && yarn build:flow",
"build": "rimraf dist/ && tsdx build --name immer --format esm,cjs,umd && cp dist/immer.esm.js dist/immer.esm.mjs && yarn build:flow",
"build:flow": "cpx 'src/types/index.js.flow' dist -v",
"publish-docs": "cd website && GIT_USER=mweststrate USE_SSH=true yarn docusaurus deploy",
"start": "cd website && yarn start",
Expand Down

0 comments on commit afaa9e7

Please sign in to comment.