Skip to content

Commit

Permalink
Add package.json exports property (#94)
Browse files Browse the repository at this point in the history
* Add package.json exports property

This allows modern build systems (vite) to properly use the correct module type (ESM). See sveltejs/kit#928 for more details.
  • Loading branch information
jirihon committed Apr 9, 2022
1 parent 74886f2 commit 5592f04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package.json
Expand Up @@ -18,6 +18,10 @@
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"typings": "dist/index.d.ts",
"exports": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
},
"scripts": {
"test": "ts-node node_modules/tape/bin/tape test/**/*.ts",
"prepublishOnly": "npm test && npm run lint && npm run build",
Expand Down

0 comments on commit 5592f04

Please sign in to comment.