-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
26 lines (25 loc) · 792 Bytes
/
Copy pathrollup.config.js
File metadata and controls
26 lines (25 loc) · 792 Bytes
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
import buble from 'rollup-plugin-buble';
import commonjs from 'rollup-plugin-commonjs';
import filesize from 'rollup-plugin-filesize';
import includePaths from 'rollup-plugin-includepaths';
import nodeResolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-js';
export default {
entry: 'src/main.js',
dest: 'build/js/build.js',
format: 'cjs',
plugins: [
buble(),
includePaths({ paths: ['src'] }),
nodeResolve({ jsnext: true, browser: true }),
commonjs({ include: 'node_modules/**' })
].concat(
process.env.NODE_ENV === 'production' ? [
filesize(), // Show filesize of prod bundle
uglify({}, minify) // Minify bundle
] : [
filesize(), // Show filesize of dev bundle
]
)
};