-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.dev.js
50 lines (47 loc) · 1.03 KB
/
rollup.config.dev.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
40
41
42
43
44
45
46
47
48
49
50
/*
* @author: <your_name>
* @date: <datetime>
* @description: rullup configuration for development
*/
import commonjs from "rollup-plugin-commonjs";
import livereload from "rollup-plugin-livereload";
import postcss from "rollup-plugin-postcss";
import resolve from "rollup-plugin-node-resolve";
import serve from "rollup-plugin-serve";
import tsplugin from "rollup-plugin-typescript2";
import image from "rollup-plugin-inline-image";
export default {
input: "./examples/examples.tsx",
output: {
file: "dist/examples.bundle.js",
format: "iife",
sourcemap: true,
globals: {
react: "React",
"react-dom": "ReactDOM",
},
},
external: ["react", "react-dom"],
plugins: [
image(),
resolve(),
commonjs(),
postcss({
modules: false,
}),
tsplugin({
clean: true,
tsconfigOverride: {
compilerOptions: {
declaration: false,
},
},
}),
serve({
open: true,
port: 3000,
contentBase: "./",
}),
livereload(),
],
};