-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.js
executable file
·82 lines (81 loc) · 2.97 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import path from "path";
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import resolve from "rollup-plugin-node-resolve";
import typescript from "rollup-plugin-typescript2";
import builtins from "rollup-plugin-node-builtins";
import globals from "rollup-plugin-node-globals";
import { terser } from "rollup-plugin-terser";
import postcss from "rollup-plugin-postcss";
import image from "@rollup/plugin-image";
import is from "react-is";
export default {
input: [
"src/widgets/action-bar/action-bar",
"src/widgets/breadcrumbs/breadcrumbs",
"src/widgets/busy-button/busy-button",
"src/widgets/calendar/calendar",
"src/widgets/checkbox-field/checkbox-field",
"src/widgets/confirm-button/confirm-button",
"src/widgets/custom-field/custom-field",
"src/widgets/date-field/date-field",
"src/widgets/date-picker/date-picker",
"src/widgets/dialog-provider/dialog-provider",
"src/widgets/dropdown-field/dropdown-field",
"src/widgets/field-decoration/field-decoration",
"src/widgets/file-field/file-field",
"src/widgets/file-picker/file-picker",
"src/widgets/flash-provider/flash-provider",
"src/widgets/infinite-list/infinite-list",
"src/widgets/loader/loader",
"src/widgets/local-storage-provider/local-storage-provider",
"src/widgets/month-date-field/month-date-field",
"src/widgets/month-date-picker/month-date-picker",
"src/widgets/multi-date-field/multi-date-field",
"src/widgets/multi-date-picker/multi-date-picker",
"src/widgets/multi-select-field/multi-select-field",
"src/widgets/object-view/object-view",
"src/widgets/pagination/pagination",
"src/widgets/password-field/password-field",
"src/widgets/popup-menu/popup-menu",
"src/widgets/select-field/select-field",
"src/widgets/table-view/table-view",
"src/widgets/tag-field/tag-field",
"src/widgets/tag-input/tag-input",
"src/widgets/text-area-field/text-area-field",
"src/widgets/text-editor-field/text-editor-field",
"src/widgets/text-field/text-field",
"src/widgets/time-field/time-field",
"src/widgets/time-picker/time-picker",
"src/utils/debounce/debounce",
"src/utils/use-countdown/use-countdown",
"src/utils/use-infinite-list/use-infinite-list",
"src/utils/use-query-params/use-query-params",
"src/utils/use-window-breakpoints/use-window-breakpoints",
"src/style"
],
output: {
dir: path.resolve(__dirname, "./dist"),
format: "es"
},
plugins: [
resolve({
extensions: [".ts", ".tsx", ".js", ".jsx", ".scss", ".css"],
preferBuiltins: true
}),
commonjs({
namedExports: {
"react-is": Object.keys(is)
}
}),
globals(),
builtins(),
typescript({ declaration: true }),
babel({ exclude: "node_modules/**" }),
postcss({ extract: false, use: ["sass"] }),
image(),
terser()
],
watch: { chokidar: { usePolling: true } },
external: ["react", "react-dom", "react-router-dom", "formik"]
};