-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrollup.config.js
43 lines (43 loc) · 1.22 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
// rollup.config.js
import babel from '@rollup/plugin-babel';
import nodeResolve from '@rollup/plugin-node-resolve';
let production = process.env.build_env === 'prod' || process.env.build_env === 'production'
const plugins = [
nodeResolve(),
];
if (production){
plugins.push(
babel({
exclude: 'node_modules/**', // only transpile our source code
babelHelpers: 'bundled',
})
)
}
export default [{
input: 'src/bundles/climate_by_location.climate_explorer.bundle.js',
output: {
file: 'dist/climate_by_location.climate_explorer.bundle.js',
format: 'umd',
name: 'ClimateByLocationWidget',
sourcemap: !production ? 'inline' : false,
},
plugins: plugins
},{
input: 'src/bundles/climate_by_location.climate_by_forest.bundle.js',
output: {
file: 'dist/climate_by_location.climate_by_forest.bundle.js',
format: 'umd',
name: 'ClimateByLocationWidget',
sourcemap: !production ? 'inline' : false,
},
plugins: plugins
},{
input: 'src/bundles/climate_by_location.complete.bundle.js',
output: {
file: 'dist/climate_by_location.complete.bundle.js',
format: 'umd',
name: 'ClimateByLocationWidget',
sourcemap: !production ? 'inline' : false,
},
plugins: plugins
}];