1 |
|
2 | var _ = require('lodash');
|
3 | var path = require('path');
|
4 | var webpack = require('webpack');
|
5 | var baseConfig = require('./webpack.config.base');
|
6 |
|
7 | module.exports = _.assign({}, baseConfig, {
|
8 | debug: true,
|
9 | devtool: 'eval',
|
10 | entry: {
|
11 | app: [
|
12 |
|
13 | 'eventsource-polyfill',
|
14 |
|
15 | 'webpack-hot-middleware/client'
|
16 | ].concat(baseConfig.entry.app),
|
17 | vendor: [
|
18 |
|
19 | 'eventsource-polyfill',
|
20 |
|
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 |
|
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 | });
|