forked from sin-group/base-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
45 lines (43 loc) · 1.08 KB
/
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
37
38
39
40
41
42
43
44
45
/**
* @author KylesLight
* @date 2018/1/10-上午12:57
* @file rollup.config.js
*/
import babel from 'rollup-plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import scss from 'rollup-plugin-scss';
import vue from 'rollup-plugin-vue';
import {uglify} from 'rollup-plugin-uglify';
export default {
input: 'src/base-ui.js',
output: {
file: 'dist/base-ui.min.js',
format: 'cjs',
name: 'BaseUI'
},
plugins: [
vue({
autoStyles: false,
styleToImports: true
}),
scss({
output: 'dist/base-ui.css',
outputStyle: 'compressed'
}),
babel({
presets: [['env', {modules: false}], 'stage-3'],
exclude: 'node_modules/**',
plugins: ['external-helpers'],
babelrc: false
}),
commonjs(),
resolve({
extensions: ['.js', '.json'],
jsnext: true,
main: true,
browser: true
}),
uglify()
]
};