-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
95 lines (92 loc) · 2.46 KB
/
Copy pathrollup.config.js
File metadata and controls
95 lines (92 loc) · 2.46 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
import babel from "rollup-plugin-babel"
import commonjs from "@rollup/plugin-commonjs"
import external from "rollup-plugin-peer-deps-external"
import resolve from "@rollup/plugin-node-resolve"
import url from "@rollup/plugin-url"
import json from "@rollup/plugin-json"
const plugins = [
external(),
url({ exclude: ["**/*.svg"] }),
babel({ exclude: "node_modules/**" }),
resolve(),
commonjs({ namedExports: { "node_modules/lodash/lodash.js": ["functions", "isEqual", "omit"] } }),
json(),
]
export default [
{
input: "src/index",
output: { file: "dist/index.js", format: "cjs" },
plugins,
},
{
input: "src/Field/index.js",
output: { file: "dist/Field/index.js", format: "cjs" },
plugins,
},
{
input: "src/Variable/index.js",
output: { file: "dist/Variable/index.js", format: "cjs" },
plugins,
},
{
input: "src/GenericObject/index.js",
output: { file: "dist/GenericObject/index.js", format: "cjs" },
plugins,
},
{
input: "src/GenericDimension/index.js",
output: { file: "dist/GenericDimension/index.js", format: "cjs" },
plugins,
},
{
input: "src/GenericBookmark/index.js",
output: { file: "dist/GenericBookmark/index.js", format: "cjs" },
plugins,
},
{
input: "src/GenericVariable/index.js",
output: { file: "dist/GenericVariable/index.js", format: "cjs" },
plugins,
},
{
input: "src/GenericMeasure/index.js",
output: { file: "dist/GenericMeasure/index.js", format: "cjs" },
plugins,
},
{
input: "src/Doc/index.js",
output: { file: "dist/Doc/index.js", format: "cjs" },
plugins,
},
{
input: "src/Global/index.js",
output: { file: "dist/Global/index.js", format: "cjs" },
plugins,
},
]
// input: {
// index: "src/index.js",
// "Field/index": "src/Field/index.js",
// "Variable/index": "src/Variable/index.js",
// "GenericObject/index": "src/GenericObject/index.js",
// "GenericDimension/index": "src/GenericDimension/index.js",
// "GenericBookmark/index": "src/GenericBookmark/index.js",
// "GenericVariable/index": "src/GenericVariable/index.js",
// "GenericMeasure/index": "src/GenericMeasure/index.js",
// "Doc/index": "src/Doc/index.js",
// "Global/index": "src/Global/index.js",
// },
// output: [
// {
// // file: pkg.main,
// dir: "dist",
// format: "cjs",
// sourcemap: true,
// },
// {
// // file: pkg.module,
// dir: "dist",
// format: "es",
// sourcemap: true,
// },
// ],