constwebpack=require('webpack');constFriendlyErrorsPlugin=require('friendly-errors-webpack-plugin');letmerge=require('webpack-merge');letbaseWebpackConfig=require('./webpack.config');// add hot-reload related code to entry chunksObject.keys(baseWebpackConfig.entry).forEach(function(name){baseWebpackConfig.entry[name]=['./tool/dev-client'].concat(baseWebpackConfig.entry[name]);});/** * dev config * * @type {Object} */module.exports=merge(baseWebpackConfig,{// cheap-module-eval-source-map is faster for developmentdevtool:'#cheap-module-eval-source-map',plugins:[newwebpack.DefinePlugin({'process.env':{'NODE_ENV':'"dev"'}}),// https://github.com/glenjamin/webpack-hot-middleware#installation--usagenewwebpack.HotModuleReplacementPlugin(),newwebpack.NoEmitOnErrorsPlugin(),// https://github.com/ampedandwired/html-webpack-pluginnewFriendlyErrorsPlugin()]});