-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
41 lines (40 loc) · 1.03 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
const json = require("rollup-plugin-json");
const commonjs = require("rollup-plugin-commonjs");
const resolve = require("rollup-plugin-node-resolve");
const babel = require("rollup-plugin-babel");
const nodeBuiltIns = require("rollup-plugin-node-builtins");
const nodeGlobals = require("rollup-plugin-node-globals");
const uglifier = require("rollup-plugin-uglify");
module.exports = {
input: "src/index.js",
output: {
file: "dist/index.js",
format: "umd",
name: "apiClientReact",
globals: {
react: "React",
axios: "axios",
"axios-retry": "axiosRetry",
rxjs: "rxjs",
"hoist-non-react-statics": "hoistNonReactStatics"
}
},
external: ["react", "hoist-non-react-statics", "axios", "axios-retry", "rxjs"],
plugins: [
resolve({
module: true,
main: true,
browser: true,
jsnext: true,
preferBuiltins: true
}),
commonjs({
include: "node_modules/**"
}),
json(),
babel(),
nodeBuiltIns(),
nodeGlobals(),
uglifier.uglify()
]
};