-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
rollup.config.js
67 lines (65 loc) · 1.25 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import beep from "@rollup/plugin-beep";
import buble from "@rollup/plugin-buble";
import common from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import sucrase from "@rollup/plugin-sucrase";
import scss from "rollup-plugin-scss";
import { terser } from "rollup-plugin-terser";
import vue from "rollup-plugin-vue";
import pkg from "./package.json";
const banner = `/*
* ${pkg.name}
* ${pkg.description}
* v${pkg.version}
* ${pkg.license} License
*/
`;
export default {
input: "src/index.js",
output: [
{
file: pkg.main,
format: "cjs",
exports: "named",
strict: true,
banner,
},
{
file: pkg.module,
format: "es",
exports: "named",
strict: true,
banner,
},
{
file: pkg.umd,
format: "umd",
exports: "named",
strict: true,
banner,
name: "FloatMenu",
globals: {
vue: "vue",
},
},
],
plugins: [
vue(),
scss(),
sucrase({
exclude: ["node_modules/**"],
transforms: ["typescript"],
}),
beep(),
common(),
buble(),
resolve(),
terser({
compress: {
drop_console: true,
drop_debugger: true,
},
}),
],
external: ["vue"],
};