-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
28 lines (27 loc) · 771 Bytes
/
rollup.config.js
File metadata and controls
28 lines (27 loc) · 771 Bytes
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
import peerDepsExternal from "rollup-plugin-peer-deps-external";
import resolve from "@rollup/plugin-node-resolve";
import postcss from "rollup-plugin-postcss";
import { terser } from "rollup-plugin-terser";
import { babel } from "@rollup/plugin-babel";
import preserveDirectives from "rollup-plugin-preserve-directives";
export default {
input: "./index.js",
output: [
{
dir: "dist/index",
exports: "named",
format: "es",
preserveModules: true,
},
],
plugins: [
peerDepsExternal(),
resolve(),
postcss({
extensions: [".css"],
}),
babel({ babelHelpers: "bundled", exclude: "node_modules/**", presets: [["@babel/preset-react", { runtime: "automatic" }]] }),
preserveDirectives(),
terser(),
],
};