Skip to content

Commit ffd61f9

Browse files
committed
add esm build
1 parent 8102b42 commit ffd61f9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

build/build.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ build([
3737
{
3838
dest: resolve('dist/vue-router.common.js'),
3939
format: 'cjs'
40+
},
41+
{
42+
dest: resolve('dist/vue-router.esm.js'),
43+
format: 'es'
4044
}
4145
].map(genConfig))
4246

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"author": "Evan You",
66
"license": "MIT",
77
"main": "dist/vue-router.common.js",
8+
"module": "dist/vue-router.esm.js",
9+
"unpkg": "dist/vue-router.js",
810
"repository": {
911
"type": "git",
1012
"url": "https://github.com/vuejs/vue-router.git"
@@ -14,6 +16,7 @@
1416
"dist/vue-router.js",
1517
"dist/vue-router.min.js",
1618
"dist/vue-router.common.js",
19+
"dist/vue-router.esm.js",
1720
"src",
1821
"types/index.d.ts",
1922
"types/router.d.ts",
@@ -79,6 +82,5 @@
7982
"vue-template-compiler": "^2.1.0",
8083
"webpack": "^2.2.0",
8184
"webpack-dev-middleware": "^1.9.0"
82-
},
83-
"unpkg": "dist/vue-router.js"
85+
}
8486
}

0 commit comments

Comments
 (0)