UNPKG

1.34 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 debug: true,
9 devtool: 'eval',
10 entry: {
11 app: [
12 // necessary for hot reloading with IE:
13 'eventsource-polyfill',
14 // listen to code updates emitted by hot middleware:
15 'webpack-hot-middleware/client'
16 ].concat(baseConfig.entry.app),
17 vendor: [
18 // necessary for hot reloading with IE:
19 'eventsource-polyfill',
20 // listen to code updates emitted by hot middleware:
21 'webpack-hot-middleware/client'
22 ].concat(baseConfig.entry.vendor)
23 },
24 output: {
25 path: path.join(__dirname, 'dist/web'),
26 filename: '[name].js',
27 publicPath: '/'
28 },
29 plugins: [
30 new webpack.DefinePlugin({
31 'process.env': {
32 // This has effect on the react lib size
33 NODE_ENV: JSON.stringify('development')
34 }
35 }),
36 new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'),
37 new webpack.optimize.OccurrenceOrderPlugin(),
38 new webpack.HotModuleReplacementPlugin(),
39 new webpack.NoErrorsPlugin()
40 ]
41});