-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.dev.js
61 lines (59 loc) · 1.62 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const path = require("path")
const inputPath = path.resolve(__dirname, "./src/index.js")
const outputPathUmd = path.resolve(__dirname, "./dist/screendatav.js")
const outputPathejs = path.resolve(__dirname, "./dist/screendataves.js")
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")
module.exports = {
input: inputPath,
output: [
{
file: outputPathUmd,
format: "umd",
name: "screenDatav",
globals: {
vue: "vue"
}
},
{
file: outputPathejs,
format: "es",
name: "screenDatav",
globals: {
vue: "vue"
}
},
],
plugins: [
vue(),
resolve(),
commonjs(),
babel({
exclude: "node_modules/**",
// plugins: [
// [
// "@babel/plugin-transform-runtime",
// {
// "absoluteRuntime": true,
// // "corejs": false,
// // "helpers": true,
// // "regenerator": true,
// // "version": "7.0.0-beta.0"
// }
// ]
// ]
}),
json(),
postcss({
plugins: []
})
],
external: [
"vue",
"echarts"
]
}