-
Notifications
You must be signed in to change notification settings - Fork 8
/
rollup.config.base.js
44 lines (39 loc) · 947 Bytes
/
rollup.config.base.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
import alias from 'rollup-plugin-alias'
import vue from 'rollup-plugin-vue'
import buble from 'rollup-plugin-buble'
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import nodeGlobals from 'rollup-plugin-node-globals'
import butternut from 'rollup-plugin-butternut'
const plugins = [
alias({
vue$: 'vue/dist/vue.common.js'
}),
vue({
css: true,
// css: './public/assets/css/app.css'
}),
buble({
objectAssign: 'Object.assign'
}),
nodeResolve({
jsnext: true,
main: true,
browser: true,
module: true,
}),
commonjs(),
nodeGlobals()
]
const config = {
name: 'VueScrollMonitor',
sourcemap: true,
plugins: plugins
}
const isProduction = process.env.NODE_ENV === `production`
const isDevelopment = process.env.NODE_ENV === `development`
if (isProduction) {
config.sourcemap = false
config.plugins.push(butternut())
}
export default config