Skip to content

Commit

Permalink
feat!: use .mjs for esm output (#197)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
bluwy and antfu committed Mar 3, 2022
1 parent 6f09557 commit 62d6e85
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions package.json
Expand Up @@ -13,8 +13,15 @@
"license": "MIT",
"author": "Rich Harris",
"main": "dist/magic-string.cjs.js",
"module": "dist/magic-string.es.js",
"jsnext:main": "dist/magic-string.es.js",
"module": "dist/magic-string.es.mjs",
"jsnext:main": "dist/magic-string.es.mjs",
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/magic-string.es.mjs",
"require": "./dist/magic-string.cjs.js"
}
},
"typings": "index.d.ts",
"files": [
"dist/*",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Expand Up @@ -13,7 +13,7 @@ export default [
external: ['sourcemap-codec'],
plugins,
output: {
file: 'dist/magic-string.es.js',
file: 'dist/magic-string.es.mjs',
format: 'es',
exports: 'named',
sourcemap: true
Expand Down

0 comments on commit 62d6e85

Please sign in to comment.