-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrollup.config.js
More file actions
28 lines (27 loc) · 823 Bytes
/
rollup.config.js
File metadata and controls
28 lines (27 loc) · 823 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 path from "path";
import commonjs from "rollup-plugin-commonjs";
import resolve from "rollup-plugin-node-resolve";
import { terser } from "rollup-plugin-terser";
import babel from "rollup-plugin-babel";
module.exports = {
input: path.resolve(__dirname, "./src/index.js"),
output: {
file: path.resolve(__dirname, "./dist/bundle.js"),
exports: "named",
format: "cjs"
},
plugins: [
babel({ exclude: "node_modules/**" }),
resolve({ extensions: [".js", ".jsx", ".scss", ".css"] }),
commonjs({
namedExports: { "node_modules/react-is/index.js": ["isValidElementType", "isContextConsumer"] }
}),
terser()
],
watch: {
chokidar: {
usePolling: true
}
},
external: ["react", "react-dom"]
};