-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
36 lines (34 loc) · 1016 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
36
import babel from 'rollup-plugin-babel'
import uglify from 'rollup-plugin-uglify'
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import eslint from 'rollup-plugin-eslint'
const isProduction = process.env.NODE_ENV === 'production'
export default {
entry: 'src/index.js',
format: 'umd',
moduleName: 'WeRegion',
plugins: [
eslint({ exclude: 'node_modules/**' }),
resolve({ jsnext: true, main: true }),
commonjs({
namedExports: {
'node_modules/raf-plus/dist/index.js': ['requestAnimationFrame']
}
}),
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [
[
'es2015', {
modules: false,
},
],
],
plugins: ['external-helpers'],
}),
(isProduction && uglify()),
],
dest: 'dist/index.js',
}