Skip to content

Commit

Permalink
fix: use require/import export map in package.json (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
revmischa committed Mar 28, 2022
1 parent 5ed963f commit 0f74908
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"license": "MIT",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"module": "dist/esm/index.mjs",
"types": "index.d.ts",
"typesVersions": {
">=4.0": {
Expand All @@ -33,14 +33,12 @@
},
"exports": {
".": {
"node": "./dist/cjs/index.js",
"es2015": "./dist/esm/index.js",
"default": "./dist/esm/index.js"
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.mjs"
},
"./locale/*": {
"node": "./dist/cjs/locale/*.js",
"es2015": "./dist/esm/locale/*.js",
"default": "./dist/esm/locale/*.js"
"require": "./dist/cjs/locale/*.js",
"import": "./dist/esm/locale/*.mjs"
},
"./package.json": "./package.json"
},
Expand Down
1 change: 1 addition & 0 deletions scripts/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ buildSync({
splitting: true,
format: 'esm',
target: 'node12.20',
outExtension: { '.js': '.mjs' },
});

0 comments on commit 0f74908

Please sign in to comment.