-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
35 lines (31 loc) · 990 Bytes
/
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
import node_resolve from 'rollup-plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import commonjs from 'rollup-plugin-commonjs';
import replace from 'rollup-plugin-replace';
export default {
input: './src/Main.bs.js',
output: {
file: './release/main.js',
format: 'iife',
name: 'starter'
},
plugins: [
node_resolve({module: true, browser: true}),
livereload('release'),
commonjs({
namedExports: {
// left-hand side can be an absolute path, a path
// relative to the current directory, or the name
// of a module in node_modules
'node_modules/lodash/lodash.js': [ 'throttle' ],
// 'node_modules/in-view/src/index.js': [ 'inView' ]
}
}),
replace({
'process.env.NODE_ENV': JSON.stringify( 'production' )
}),
],
watch: {
clearScreen: false
}
}