Skip to content

Commit c116714

Browse files
committed
fix: build for mjs and exports all submodules
1 parent fc9d410 commit c116714

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
"url": "git+https://github.com/vuejs/composition-api.git"
1212
},
1313
"main": "./index.js",
14-
"module": "./dist/vue-composition-api.esm.js",
14+
"module": "./dist/vue-composition-api.mjs",
1515
"unpkg": "./dist/vue-composition-api.prod.js",
1616
"jsdelivr": "./dist/vue-composition-api.prod.js",
1717
"types": "./dist/index.d.ts",
1818
"exports": {
1919
".": {
20-
"import": "./dist/vue-composition-api.esm.js",
20+
"import": "./dist/vue-composition-api.mjs",
2121
"require": "./index.js"
22-
}
22+
},
23+
"./*": "./*"
2324
},
2425
"author": {
2526
"name": "liximomo",

rollup.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ const builds = {
3232
format: 'es',
3333
mode: 'development',
3434
},
35+
mjs: {
36+
outFile: 'vue-composition-api.mjs',
37+
format: 'es',
38+
mode: 'development',
39+
},
3540
}
3641

3742
function onwarn(msg, warn) {

0 commit comments

Comments
 (0)