-
Notifications
You must be signed in to change notification settings - Fork 15
/
rollup.config.mjs
77 lines (75 loc) · 1.53 KB
/
rollup.config.mjs
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
68
69
70
71
72
73
74
75
76
77
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 autoprefixer from "autoprefixer";
import preset from "postcss-preset-env";
import postcss from "rollup-plugin-postcss";
import { terser } from "rollup-plugin-terser";
import vue from "rollup-plugin-vue";
import pkg from "./package.json" assert { type: "json" };
import cssnano from "cssnano";
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({
target: "browser",
css: true,
}),
postcss({
extract: "smart-tagz.css",
plugins: [
preset({
stage: 0,
}),
autoprefixer(),
cssnano()
],
}),
sucrase({
exclude: ["node_modules/**"],
transforms: ["typescript"],
}),
common(),
buble(),
beep(),
resolve(),
terser(),
],
external: ["vue", "vue-feather-icons"],
};