-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrollup.config.js
More file actions
47 lines (45 loc) · 1.14 KB
/
rollup.config.js
File metadata and controls
47 lines (45 loc) · 1.14 KB
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
import resolve from "rollup-plugin-node-resolve";
import { terser } from "rollup-plugin-terser";
import commonjs from "rollup-plugin-commonjs";
import babel from "rollup-plugin-babel";
import svg from "rollup-plugin-svg";
const NODE_ENV = "production";
export default {
external: ["react", "react-dom", "lodash", "styled-components"],
input: {
main: "src/main.js",
alert: "src/components/alert.js",
cards: "src/components/cards/index.js",
form: "src/components/forms/index.js",
lists: "src/components/lists/index.js",
layout: "src/components/layouts/index.js",
buttons: "src/components/buttons/index.js",
typography: "src/components/typography/index.js",
special: "src/components/special/index.js",
utils: "src/libs/utils.js",
},
output: [
{
dir: "./lib/",
format: "cjs",
exports: "named",
globals: {
"styled-components": "styled",
},
},
// {
// dir: "./dist/es",
// format: "esm",
// exports: "named",
// },
],
plugins: [
resolve(),
babel({
exclude: "node_modules/**",
}),
commonjs(),
svg(),
terser(),
],
};