-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathrollup.config.js
56 lines (50 loc) · 1.27 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
import {babel} from '@rollup/plugin-babel';
import {nodeResolve} from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import replace from '@rollup/plugin-replace';
// import globals from 'rollup-plugin-node-globals';
const plugins = [
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true
}),
babel({
exclude: 'node_modules/**',
sourceMap: false,
babelHelpers: 'bundled'
}),
nodeResolve({
mainFields: ['module', 'main'],
// preferBuiltins: false,
browser: true
}),
commonjs({
include: 'node_modules/**', // Default: undefined
// if true then uses of `global` won't be dealt with by this plugin
ignoreGlobal: false, // Default: false
sourceMap: false, // Default: true
}),
];
export default [{
input: "./assets/rxjs/rxjs.main.js",
output: {
file: './assets/rxjs/rxjs.main.bundle.js',
compact: true,
format: 'iife',
indent: true,
name: "rxjsMain",
exports: "default"
},
plugins: plugins
}, {
input: "./assets/rxjs/rxjs.operators.js",
output: {
file: './assets/rxjs/rxjs.operators.bundle.js',
compact: true,
format: 'iife',
indent: true,
name: "rxjsOperators",
exports: "default"
},
plugins: plugins
}];