diff --git a/package.json b/package.json index aee5d780..495a5b5c 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "homepage": "https://github.com/vega/vega-embed#readme", "license": "BSD-3-Clause", "main": "build/vega-embed.js", - "module": "build/vega-embed.module.js", + "module": "build/vega-embed.module.mjs", "unpkg": "build/vega-embed.min.js", "jsdelivr": "build/vega-embed.min.js", "types": "build/src/embed.d.ts", @@ -41,7 +41,7 @@ ".": { "import": { "types": "./build/src/embed.d.ts", - "default": "./build/vega-embed.module.js" + "default": "./build/vega-embed.module.mjs" }, "require": { "default": "./build/vega-embed.js" diff --git a/rollup.config.mjs b/rollup.config.mjs index e494162d..15775ed8 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -24,7 +24,7 @@ export default [ { input: "src/embed.ts", output: { - file: "build/vega-embed.module.js", + file: "build/vega-embed.module.mjs", format: "esm", sourcemap: true, },