use umd for cjs build size check

This commit is contained in:
Evan You 2016-04-19 19:45:15 -04:00
parent 9d5d4671e0
commit ae881f514b

View File

@ -48,8 +48,11 @@ rollup.rollup({
] ]
}) })
}).then(function (bundle) { }).then(function (bundle) {
// use UMD to wrap the code so that variable names are mangled
// for proper minification size.
var code = bundle.generate({ var code = bundle.generate({
format: 'cjs' format: 'umd',
moduleName: 'Vue'
}).code }).code
return write('dist/vue.common.min.js', uglify.minify(code, { return write('dist/vue.common.min.js', uglify.minify(code, {
fromString: true, fromString: true,