2016-10-13 06:27:58 +00:00
|
|
|
import webpack from 'webpack';
|
|
|
|
|
import merge from 'webpack-merge';
|
|
|
|
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
|
|
|
import baseWebpackConfig from './base';
|
2016-11-16 04:15:17 +00:00
|
|
|
import config from '../config';
|
2016-10-13 06:27:58 +00:00
|
|
|
|
|
|
|
|
Object.keys(baseWebpackConfig.entry).forEach((name) => {
|
|
|
|
|
baseWebpackConfig.entry[name] = ['./build/server/client'].concat(baseWebpackConfig.entry[name]);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default merge(baseWebpackConfig, {
|
2016-11-29 04:32:43 +00:00
|
|
|
devtool: 'source-map',
|
2016-10-13 06:27:58 +00:00
|
|
|
plugins: [
|
2016-11-16 04:15:17 +00:00
|
|
|
new webpack.WatchIgnorePlugin([config.nodePath]),
|
2016-10-13 06:27:58 +00:00
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
|
|
|
new webpack.NoErrorsPlugin(),
|
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
|
filename: 'index.html',
|
|
|
|
|
template: 'docs/index.html',
|
|
|
|
|
inject: true
|
|
|
|
|
})
|
|
|
|
|
]
|
|
|
|
|
});
|