forked from DimitryDushkin/sliding-pane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup-docs.config.js
45 lines (42 loc) · 1.07 KB
/
rollup-docs.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
37
38
39
40
41
42
43
44
45
import commonjs from "rollup-plugin-commonjs";
import resolve from "rollup-plugin-node-resolve";
import babel from "rollup-plugin-babel";
import postcss from "rollup-plugin-postcss";
import replace from "rollup-plugin-replace";
import path from "path";
const extensions = [".js", ".jsx", ".es6", ".es", ".mjs", ".tsx", ".ts"];
export default {
input: "docs/src/app.tsx",
output: {
file: path.resolve(__dirname, "docs/dist/bundle.js"),
format: "iife",
sourcemap: true,
},
plugins: [
postcss(),
replace({
"process.env.NODE_ENV": JSON.stringify("production"),
}),
babel({
exclude: "node_modules/**",
runtimeHelpers: true,
extensions,
}),
resolve({
extensions: [...extensions, ".css"],
}),
commonjs({
include: "node_modules/**",
namedExports: {
"node_modules/react/index.js": [
"Component",
"PureComponent",
"Fragment",
"Children",
"createElement",
],
"node_modules/react-dom/index.js": ["render"],
},
}),
],
};