forked from JosephusPaye/Keen-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.build.min.js
42 lines (33 loc) · 882 Bytes
/
webpack.build.min.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
var path = require('path');
var webpack = require('webpack');
var config = require('./webpack.config.js');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
delete config.devtool;
delete config.watch;
delete config.plugins;
config.entry = './src/index.js';
config.plugins = [
new webpack.BannerPlugin(config.banner, {
raw: true,
entryOnly: true
}),
new ExtractTextPlugin('./keen-ui.min.css'),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurenceOrderPlugin()
];
config.output = {
path: path.join(__dirname, 'dist/min'),
filename: 'keen-ui.min.js',
library: 'Keen',
libraryTarget: 'umd'
};
module.exports = config;