Skip to content

Commit

Permalink
add esm builds
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 26, 2017
1 parent cf7b90f commit 1b6a7d4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
16 changes: 16 additions & 0 deletions build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ const builds = {
alias: { he: './entity-decoder' },
banner
},
// Runtime only (ES Modules). Used by bundlers that support ES Modules,
// e.g. Rollup & Webpack 2
'web-runtime-esm': {
entry: path.resolve(__dirname, '../src/entries/web-runtime.js'),
dest: path.resolve(__dirname, '../dist/vue.runtime.esm.js'),
format: 'es',
banner
},
// Runtime+compiler CommonJS build (ES Modules)
'web-full-esm': {
entry: path.resolve(__dirname, '../src/entries/web-runtime-with-compiler.js'),
dest: path.resolve(__dirname, '../dist/vue.esm.js'),
format: 'es',
alias: { he: './entity-decoder' },
banner
},
// runtime-only build (Browser)
'web-runtime-dev': {
entry: path.resolve(__dirname, '../src/entries/web-runtime.js'),
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"version": "2.2.0-beta.2",
"description": "Reactive, component-oriented view layer for modern web interfaces.",
"main": "dist/vue.runtime.common.js",
"module": "dist/vue.runtime.esm.js",
"unpkg": "dist/vue.js",
"typings": "types/index.d.ts",
"files": [
"dist/vue.js",
Expand Down Expand Up @@ -117,6 +119,5 @@
"webpack": "^2.2.0",
"weex-js-runtime": "^0.17.0-alpha4",
"weex-vdom-tester": "^0.1.4"
},
"unpkg": "dist/vue.js"
}
}

0 comments on commit 1b6a7d4

Please sign in to comment.