const webpack = require('webpack'); const path = require('path'); const merge = require('webpack-merge'); const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const devInfo = require('./dev-info.js'); let baseConfig = require('./webpack.base.config.js'); baseConfig = baseConfig('dev'); Object.keys(baseConfig.entry).forEach(function(name) { baseConfig.entry[name] = [path.join(__dirname, './dev-client.js')].concat(baseConfig.entry[name]); }); module.exports = merge(baseConfig, { output: { publicPath: devInfo.publicPath }, devtool: 'source-map', plugins: [ new ExtractTextPlugin('[name].css'), new webpack.HotModuleReplacementPlugin(), new FriendlyErrorsPlugin() ] });