Use .mjs for ESM
This commit is contained in:
@ -4,14 +4,14 @@
|
|||||||
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
|
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "build/index.umd.js",
|
"main": "build/index.umd.js",
|
||||||
"module": "./build/index.js",
|
"module": "./build/index.mjs",
|
||||||
"types": "./build/index.d.ts",
|
"types": "./build/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"require": "./build/index.cjs",
|
"require": "./build/index.cjs",
|
||||||
"types": "./build/index.d.ts",
|
"types": "./build/index.d.ts",
|
||||||
"import": "./build/index.js",
|
"import": "./build/index.mjs",
|
||||||
"default": "./build/index.js"
|
"default": "./build/index.mjs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -39,7 +39,7 @@ export default defineConfig({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (d === "es") {
|
if (d === "es") {
|
||||||
return "index.js";
|
return "index.mjs";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d === "iife") {
|
if (d === "iife") {
|
||||||
|
Reference in New Issue
Block a user