-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.dev.js
40 lines (39 loc) · 1010 Bytes
/
rollup.config.dev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const path = require('path')
const resolve =require('rollup-plugin-node-resolve')
const commonjs= require('rollup-plugin-commonjs')
const babel = require('rollup-plugin-babel')
const json = require('rollup-plugin-json')
const vue = require('rollup-plugin-vue')
const postcss= require('rollup-plugin-postcss')
const inputPath = path.resolve(__dirname, './src/index.js')
const outputUmdPath = path.resolve(__dirname, './dist/torres.datav.js')
const outputEsPath = path.resolve(__dirname, './dist/torres.datav.es.js')
module.exports={
input:inputPath,
output:[{
file:outputUmdPath, //输出路径
format:'umd', //输出umd模块
name:'torresDatav',
globals:{
'vue':'Vue'
}
},{
file:outputEsPath, //输出路径
format:'es', //输出es模块
}],
plugins:[
vue(),
resolve(),
commonjs(),
babel({
exclude:'node_modules/**' //指定文件不进行Babel编译
}),
json(),
postcss({
plugins:[]
})
],
external:[
'vue'
]
}