-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathrollup.config.js
36 lines (35 loc) · 984 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
import copy from "@polypoly-eu/rollup-plugin-copy-watch";
import sucrase from "@rollup/plugin-sucrase";
export default {
input: "src/index.jsx",
output: {
file: "dist/index.js",
format: "iife",
globals: {
react: "React",
"react-dom": "ReactDOM",
pod: "pod",
},
},
plugins: [
sucrase({
transforms: ["jsx"],
production: true,
}),
copy({
targets: [
{
src: [
"node_modules/react/umd/react.development.js",
"node_modules/react-dom/umd/react-dom.development.js",
"node_modules/@polypoly-eu/podjs/dist/pod.js",
"src/index.html",
],
dest: "dist",
},
],
verbose: true,
}),
],
external: ["react", "react-dom", "pod"],
};