From 80af029e13ed8bebbda8c260f1646dff6d3243c4 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 17 Jun 2021 15:18:50 +0800 Subject: [PATCH] fix: use `.mjs` extension for ESM bundles --- package.json | 2 +- rollup.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7f736eb1a..bd5189a0f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/vue-test-utils.cjs.js", "unpkg": "dist/vue-test-utils.browser.js", "types": "dist/index.d.ts", - "module": "dist/vue-test-utils.esm-bundler.js", + "module": "dist/vue-test-utils.esm-bundler.mjs", "files": [ "dist", "README.md", diff --git a/rollup.config.js b/rollup.config.js index 81f7cc54d..9e031dd8c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -55,7 +55,7 @@ function createEntry(options) { if (format === 'es') { config.output.file = pkg.module if (isBrowser) { - config.output.file = 'dist/vue-test-utils.esm-browser.js' + config.output.file = 'dist/vue-test-utils.esm-browser.mjs' } } if (format === 'cjs') {