update rollup config (terser compress)

This commit is contained in:
jiaming743 2019-09-10 15:11:09 +08:00
parent 3ebbac5de3
commit 5796c92fc6
2 changed files with 25 additions and 2 deletions

View File

@ -5,10 +5,9 @@ import babel from 'rollup-plugin-babel'
export default { export default {
input: 'build/entry.js', input: 'build/entry.js',
// input: 'src/index.js',
output: { output: {
format: 'umd', format: 'umd',
file: 'dist/datav.map.js', file: 'dist/datav.map.vue.js',
name: 'datav' name: 'datav'
}, },
plugins: [ plugins: [

View File

@ -0,0 +1,24 @@
import resolve from 'rollup-plugin-node-resolve'
import vue from 'rollup-plugin-vue'
import commonjs from 'rollup-plugin-commonjs'
import babel from 'rollup-plugin-babel'
import { terser } from "rollup-plugin-terser"
export default {
input: 'build/entry.js',
output: {
format: 'umd',
file: 'dist/datav.min.vue.js',
name: 'datav'
},
plugins: [
terser(),
resolve(),
babel({
exclude: 'node_modules/**'
}),
commonjs(),
vue(),
],
external: ['Vue']
}