UNPKG

1.01 kBJavaScriptView Raw
1/* eslint no-var: 0 */
2var _ = require('lodash');
3var path = require('path');
4var webpack = require('webpack');
5var baseConfig = require('./webpack.config.base');
6
7module.exports = _.assign({}, baseConfig, {
8 devtool: 'source-map',
9 entry: {
10 app: baseConfig.entry.app,
11 vendor: baseConfig.entry.vendor
12 },
13 output: {
14 path: path.join(__dirname, 'dist/web'),
15 filename: '[name].js',
16 publicPath: '/'
17 },
18 plugins: [
19 new webpack.DefinePlugin({
20 'process.env': {
21 // This has effect on the react lib size
22 NODE_ENV: JSON.stringify('production')
23 }
24 }),
25 new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'),
26 new webpack.optimize.OccurrenceOrderPlugin(),
27 new webpack.optimize.DedupePlugin(),
28 new webpack.optimize.UglifyJsPlugin({
29 compress: {
30 warnings: false
31 },
32 mangle: false
33 })
34 ]
35});