-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.dev.js
47 lines (45 loc) · 1.05 KB
/
rollup.config.dev.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
import resolve from 'rollup-plugin-node-resolve'
import babel from 'rollup-plugin-babel'
import replace from 'rollup-plugin-replace'
import commonjs from 'rollup-plugin-commonjs'
import scss from 'rollup-plugin-scss'
import serve from 'rollup-plugin-serve'
import livereload from 'rollup-plugin-livereload'
export default {
input: 'src/index.js',
plugins: [
babel({
babelrc: false,
exclude: [
'node_modules/**',
'**/*.scss'
],
presets: [['es2015', { loose: true, modules: false }], 'stage-1', 'react'],
plugins: [['external-helpers']]
}),
replace({
'process.env.NODE_ENV': JSON.stringify('development'),
}),
scss({
output: 'dist/style.css'
}),
resolve(),
commonjs({
include: 'node_modules/**'
}),
serve({
open: true,
verbose: true,
contentBase: '',
historyApiFallback: false,
host: 'localhost',
port: 3002
}),
livereload('dist')
],
output: {
file: 'dist/bundle.js',
format: 'iife',
sourcemap: true
},
}