-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.min.js
35 lines (34 loc) · 1.1 KB
/
webpack.config.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
const webpack = require('webpack');
const path = require('path');
const fs = require('fs');
const webpackMerge = require('webpack-merge');
const commonConfig = require('./webpack.base.js');
module.exports = function(env) {
return webpackMerge(commonConfig(), {
output: {
filename: 'ng-augment-native-scroll.min.js',
path: path.resolve(__dirname, 'dist'),
library: 'ng-augment-native-scroll',
libraryTarget: 'umd'
},
devtool: 'cheap-module-source-map',
plugins: [
new webpack.optimize.UglifyJsPlugin({
beautify: false,
mangle: {
screw_ie8: true,
keep_fnames: true
},
compress: {
screw_ie8: true
},
comments: false
}),
new webpack.BannerPlugin({
banner: `v${require('./package.json').version}\n\n${fs.readFileSync('./LICENSE', 'utf8')}`,
raw: false,
entryOnly: true
})
]
});
}