-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathrollup.examples.config.mjs
45 lines (44 loc) · 1.06 KB
/
rollup.examples.config.mjs
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
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import sourceMaps from "rollup-plugin-sourcemaps";
import replace from "@rollup/plugin-replace";
import typescript from "rollup-plugin-typescript2";
import serve from "rollup-plugin-serve";
import livereload from "rollup-plugin-livereload";
import multiInput from 'rollup-plugin-multi-input';
export default {
input: ["examples/*.js", "examples/*.ts"],
output: {
dir: "dist",
format: "esm",
},
watch: {
include: "*/**",
},
plugins: [
multiInput.default(),
typescript({
useTsconfigDeclarationDir: true,
tsconfigOverride: {
compilerOptions: {
target: "ES6",
},
},
}),
commonjs(),
resolve(),
sourceMaps(),
// peerDepsExternal(),
replace({
"process.env.NODE_ENV": JSON.stringify("development"),
preventAssignment: true,
}),
serve({
open: true,
contentBase: ["dist"],
openPage: "/",
historyApiFallback: true,
}),
livereload(),
],
};