-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
rollup.config.js
39 lines (38 loc) · 980 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 typescript from "@rollup/plugin-typescript";
import sourceMaps from "rollup-plugin-sourcemaps";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import replace from "@rollup/plugin-replace";
export default {
input:"./packages/vue/src/index.ts",
plugins: [
replace({
"process.env.NODE_ENV": JSON.stringify("development"),
"process.env.VUE_ENV": JSON.stringify("browser"),
"process.env.LANGUAGE": JSON.stringify(process.env.LANGUAGE),
}),
resolve(),
commonjs(),
typescript(),
sourceMaps(),
],
output: [
{
format: "cjs",
file: "./packages/vue/dist/mini-vue.cjs.js",
sourcemap: true,
},
{
name: "vue",
format: "es",
file: "./packages/vue/dist/mini-vue.esm-bundler.js",
sourcemap: true,
},
],
onwarn: (msg, warn) => {
// 忽略 Circular 的错误
if (!/Circular/.test(msg)) {
warn(msg);
}
},
};