Skip to content

Commit

Permalink
Use .mjs for ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
dolanmiu committed Sep 26, 2023
1 parent ccc3916 commit 23a0a59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
"type": "module",
"main": "build/index.umd.js",
"module": "./build/index.js",
"module": "./build/index.mjs",
"types": "./build/index.d.ts",
"exports": {
".": {
"require": "./build/index.cjs",
"types": "./build/index.d.ts",
"import": "./build/index.js",
"default": "./build/index.js"
"import": "./build/index.mjs",
"default": "./build/index.mjs"
}
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default defineConfig({
}

if (d === "es") {
return "index.js";
return "index.mjs";
}

if (d === "iife") {
Expand Down

0 comments on commit 23a0a59

Please sign in to comment.