Skip to content

Commit

Permalink
fix(esbuild): mjs extensions in esm build
Browse files Browse the repository at this point in the history
  • Loading branch information
Anber committed Feb 5, 2024
1 parent d2d3f6a commit f6d367b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-pugs-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wyw-in-js/esbuild': patch
---

Use mjs extensions in esm build of esbuild.
6 changes: 3 additions & 3 deletions packages/esbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"node": ">=16.0.0"
},
"exports": {
"import": "./esm/index.js",
"import": "./esm/index.mjs",
"require": "./lib/index.js",
"types": "./types/index.d.ts"
},
Expand All @@ -28,15 +28,15 @@
],
"license": "MIT",
"main": "lib/index.js",
"module": "esm/index.js",
"module": "esm/index.mjs",
"peerDependencies": {
"esbuild": ">=0.12.0"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build:esm": "babel src --out-dir esm --extensions '.js,.jsx,.ts,.tsx' --source-maps --delete-dir-on-start",
"build:esm": "babel src --out-dir esm --out-file-extension .mjs --extensions '.js,.jsx,.ts,.tsx' --source-maps --delete-dir-on-start",
"build:lib": "cross-env NODE_ENV=legacy babel src --out-dir lib --extensions '.js,.jsx,.ts,.tsx' --source-maps --delete-dir-on-start",
"build:types": "tsc --project ./tsconfig.lib.json --baseUrl . --rootDir ./src",
"lint": "eslint --ext .js,.ts ."
Expand Down

0 comments on commit f6d367b

Please sign in to comment.