forked from minnojs/minno-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
executable file
·31 lines (29 loc) · 917 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
import {version} from './package.json';
import bubel from 'rollup-plugin-buble';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import includePaths from 'rollup-plugin-includepaths';
import { uglify } from 'rollup-plugin-uglify';
const production = process.env.NODE_ENV == 'production';
const banner = `/**
* @preserve minno-dashboard v${version}
* @license Apache-2.0 (${(new Date()).getFullYear()})
*/
`;
export default {
input: 'dashboard/src/main.js',
output :{
format: 'iife',
file: 'dashboard/dist/main.js',
sourcemap: true,
banner
},
plugins: [
resolve(),
commonjs(),
// load paths without a leading slash of src
includePaths({ paths: ['dashboard/src'] }),
bubel(),
production && uglify({output:{comments:'some' }}) // minify, but only in production
]
};