-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.dist.config.js
More file actions
32 lines (25 loc) · 912 Bytes
/
webpack.dist.config.js
File metadata and controls
32 lines (25 loc) · 912 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
27
28
29
30
31
32
var webpack = require('webpack');
var config = require('./webpack.config');
var path = require('path');
var CopyWebpackPlugin = require('copy-webpack-plugin');
config.output = {
filename: 'bundle.js',
publicPath: '',
path: path.resolve(__dirname, 'build')
};
config.plugins = config.plugins.concat([
// Reduces bundles total size
new webpack.optimize.UglifyJsPlugin({
mangle: {
// You can specify all variables that should not be mangled.
// For example if your vendor dependency doesn't use modules
// and relies on global variables. Most of angular modules relies on
// angular global variable, so we should keep it unchanged
except: ['$super', '$', 'exports', 'require', 'angular']
}
}),
new CopyWebpackPlugin([
{ from: '../index.html', to: '../build/index.html' }
])
]);
module.exports = config;