Skip to content

Commit

Permalink
fix: expose esm build as .mjs file
Browse files Browse the repository at this point in the history
this should hopefully ensure that consuming runtimes know how to read this

fix #27
  • Loading branch information
Xiphe committed Jan 24, 2023
1 parent fa175f5 commit e0d517f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"version": "0.0.0-development",
"description": "neat wrapper for various caches",
"main": "dist/index.cjs",
"module": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
"scripts": {
"prepare": "rm -rf dist && npm run build",
"build": "npm run build:declarations && npm run build:esm && npm run build:cjs",
"build:declarations": "tsc && rm dist/cachified.spec.d.ts",
"build:esm": "esbuild src/index.ts --outfile=dist/index.js --format=esm --bundle --target=es2020 --sourcemap --minify",
"build:esm": "esbuild src/index.ts --outfile=dist/index.mjs --format=esm --bundle --target=es2020 --sourcemap --minify",
"build:cjs": "esbuild src/index.ts --outfile=dist/index.cjs --format=cjs --bundle --target=es2016 --sourcemap",
"test": "jest"
},
Expand Down

0 comments on commit e0d517f

Please sign in to comment.