Skip to content

Commit e0d517f

Browse files
committed
fix: expose esm build as .mjs file
this should hopefully ensure that consuming runtimes know how to read this fix #27
1 parent fa175f5 commit e0d517f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
"version": "0.0.0-development",
44
"description": "neat wrapper for various caches",
55
"main": "dist/index.cjs",
6-
"module": "dist/index.js",
6+
"module": "dist/index.mjs",
77
"types": "dist/index.d.ts",
88
"exports": {
99
".": {
1010
"require": "./dist/index.cjs",
11-
"import": "./dist/index.js",
11+
"import": "./dist/index.mjs",
1212
"types": "./dist/index.d.ts"
1313
}
1414
},
1515
"scripts": {
1616
"prepare": "rm -rf dist && npm run build",
1717
"build": "npm run build:declarations && npm run build:esm && npm run build:cjs",
1818
"build:declarations": "tsc && rm dist/cachified.spec.d.ts",
19-
"build:esm": "esbuild src/index.ts --outfile=dist/index.js --format=esm --bundle --target=es2020 --sourcemap --minify",
19+
"build:esm": "esbuild src/index.ts --outfile=dist/index.mjs --format=esm --bundle --target=es2020 --sourcemap --minify",
2020
"build:cjs": "esbuild src/index.ts --outfile=dist/index.cjs --format=cjs --bundle --target=es2016 --sourcemap",
2121
"test": "jest"
2222
},

0 commit comments

Comments
 (0)