Skip to content

Commit

Permalink
fix: copy files to mjs for node compat (#58)
Browse files Browse the repository at this point in the history
* fix: copy files to mjs for node compat

* fix: correct pkg.json
  • Loading branch information
JoviDeCroock authored May 24, 2022
1 parent ce46ca7 commit 1f98518
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
"exports": {
".": {
"types": "./types/index.d.ts",
"import": "./dist/esm/index.js",
"browser": "./dist/cjs/index.js"
"browser": "./dist/esm/index.js",
"import": "./dist/esm/index.mjs",
"require": "./dist/cjs/index.js"
},
"./pure": {
"types": "./pure.d.ts",
"import": "./dist/esm/pure.js",
"browser": "./dist/cjs/pure.js"
"browser": "./dist/esm/pure.js",
"import": "./dist/esm/pure.mjs",
"require": "./dist/cjs/pure.js"
}
},
"license": "MIT",
Expand Down Expand Up @@ -53,9 +55,10 @@
"toc": "doctoc README.md",
"lint": "eslint src/**/*.js --fix",
"clean": "rimraf dist",
"build": "npm run build:cjs && npm run build:esm",
"build": "npm run build:cjs && npm run build:esm && npm run copy:mjs",
"build:cjs": "babel src --out-dir dist/cjs --config-file ./.babelrc --ignore '**/__tests__/**,**/__mocks__/**'",
"build:esm": "babel src --no-babelrc --out-dir dist/esm --config-file ./.babelrc.esm.json --ignore '**/__tests__/**,**/__mocks__/**'",
"copy:mjs": "cp ./dist/esm/fire-event.js ./dist/esm/fire-event.mjs && cp ./dist/esm/pure.js ./dist/esm/pure.mjs && cp ./dist/esm/index.js ./dist/esm/index.mjs",
"test": "jest src/__tests__ ",
"test:watch": "npm test --watch",
"test:update": "npm test --updateSnapshot --coverage",
Expand Down

0 comments on commit 1f98518

Please sign in to comment.