Skip to content

Commit

Permalink
Merge pull request #206 from eventualbuddha/fix/compat
Browse files Browse the repository at this point in the history
fix: make module compatible with import & require
  • Loading branch information
eventualbuddha authored Nov 20, 2021
2 parents d2aedf5 + e4ec05b commit 1596423
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@
"license": "MIT",
"author": "Brian Donovan <[email protected]>",
"type": "module",
"exports": "./build/index.js",
"main": "./build/index.cjs",
"exports": {
"import": "./build/index.mjs",
"require": "./build/index.cjs"
},
"types": "./build/index.d.ts",
"files": [
"build"
],
"scripts": {
"prebuild": "rm -rf build",
"build": "tsc --build tsconfig.build.json",
"build:watch": "tsc --build tsconfig.build.json --watch",
"build": "tsc --project tsconfig.build.json && mv build/index.js build/index.mjs && tsc --project tsconfig.build.json --module commonjs && mv build/index.js build/index.cjs",
"build:watch": "tsc --project tsconfig.build.json --watch",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prepublishOnly": "npm run lint && npm run build",
Expand Down

0 comments on commit 1596423

Please sign in to comment.