-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathrollup.config.js
38 lines (36 loc) · 947 Bytes
/
rollup.config.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
const resolve = require("rollup-plugin-node-resolve");
const commonjs = require("rollup-plugin-commonjs");
const typescript = require("rollup-plugin-typescript");
const vue = require("rollup-plugin-vue");
const rebaseAssets = require("rollup-plugin-rebase");
const svg = require("rollup-plugin-svg");
const minify = require("rollup-plugin-babel-minify");
import { terser } from "rollup-plugin-terser";
module.exports = {
input: "src/system.js",
output: [
{
file: "dist/beaker.common.js",
format: "cjs"
},
{
file: "dist/beaker.esm.js",
format: "esm",
exports: "named"
}
],
external: ["vue", "vue-router", "lodash"],
plugins: [
resolve(),
commonjs({
namedExports: {
"node_modules/vue-color/dist/vue-color.min.js": ["Chrome"]
}
}),
typescript(),
vue({ defaultLang: { script: "ts", style: "less" } }),
rebaseAssets(),
svg(),
terser()
]
};