Skip to content

Commit

Permalink
fix: build for mjs and exports all submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 18, 2021
1 parent 16e831b commit 69538ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -11,15 +11,16 @@
"url": "git+https://github.com/vuejs/composition-api.git"
},
"main": "./index.js",
"module": "./dist/vue-composition-api.esm.js",
"module": "./dist/vue-composition-api.mjs",
"unpkg": "./dist/vue-composition-api.prod.js",
"jsdelivr": "./dist/vue-composition-api.prod.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/vue-composition-api.esm.js",
"import": "./dist/vue-composition-api.mjs",
"require": "./index.js"
}
},
"./*": "./*"
},
"author": {
"name": "liximomo",
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Expand Up @@ -32,6 +32,11 @@ const builds = {
format: 'es',
mode: 'development',
},
mjs: {
outFile: 'vue-composition-api.mjs',
format: 'es',
mode: 'development',
},
}

function onwarn(msg, warn) {
Expand Down

0 comments on commit 69538ee

Please sign in to comment.