Skip to content

Commit 5592f04

Browse files
authoredApr 9, 2022
Add package.json exports property (#94)
* 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.
1 parent 74886f2 commit 5592f04

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎package.json

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
"main": "dist/index.cjs.js",
1919
"module": "dist/index.esm.js",
2020
"typings": "dist/index.d.ts",
21+
"exports": {
22+
"import": "./dist/index.esm.js",
23+
"require": "./dist/index.cjs.js"
24+
},
2125
"scripts": {
2226
"test": "ts-node node_modules/tape/bin/tape test/**/*.ts",
2327
"prepublishOnly": "npm test && npm run lint && npm run build",

0 commit comments

Comments
 (0)
Please sign in to comment.