-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
39 lines (38 loc) · 966 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
39
import esbuild from "rollup-plugin-esbuild";
import vue from "rollup-plugin-vue";
import scss from "rollup-plugin-scss";
import dartSass from "sass";
import { terser } from "rollup-plugin-terser";
import svg from "rollup-plugin-svg";
export default {
input: "src/lib/index.ts",
output: [
{
globals: {
vue: "Vue",
},
name: "bili",
file: "dist/lib/bili.js",
format: "umd",
plugins: [terser()],
},
{
name: "bili",
file: "dist/lib/bili.esm.js",
format: "es",
plugins: [terser()],
},
],
plugins: [
scss({ include: /\.scss$/, sass: dartSass }),
esbuild({
include: /\.[jt]s$/,
minify: process.env.NODE_ENV === "production",
target: "es2015",
}),
vue({
include: /\.vue$/,
}),
svg(),
],
};