From 23a0a59454086e2bd37f1c501a978a49bf66be07 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Tue, 26 Sep 2023 22:59:32 +0100 Subject: [PATCH] Use .mjs for ESM --- package.json | 6 +++--- vite.config.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 976b1c6df65..fdb080ee542 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/vite.config.ts b/vite.config.ts index cc3d2cc547e..bbe8819ad31 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -39,7 +39,7 @@ export default defineConfig({ } if (d === "es") { - return "index.js"; + return "index.mjs"; } if (d === "iife") {