Browse Source

add esm builds

dev
Evan You 8 years ago
parent
commit
1b6a7d4b87
  1. 16
      build/config.js
  2. 5
      package.json

16
build/config.js

@ -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'),

5
package.json

@ -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",
@ -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"
}
}

Loading…
Cancel
Save