|
|
@ -6,7 +6,6 @@ var merge = require('webpack-merge') |
|
|
|
var baseWebpackConfig = require('./webpack.base.conf') |
|
|
|
var baseWebpackConfig = require('./webpack.base.conf') |
|
|
|
var HtmlWebpackPlugin = require('html-webpack-plugin') |
|
|
|
var HtmlWebpackPlugin = require('html-webpack-plugin') |
|
|
|
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') |
|
|
|
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') |
|
|
|
var dependencies = require('../package.json').dependencies |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// add hot-reload related code to entry chunks
|
|
|
|
// add hot-reload related code to entry chunks
|
|
|
|
Object.keys(baseWebpackConfig.entry).forEach(function (name) { |
|
|
|
Object.keys(baseWebpackConfig.entry).forEach(function (name) { |
|
|
@ -26,8 +25,7 @@ module.exports = merge(baseWebpackConfig, { |
|
|
|
cache: true, |
|
|
|
cache: true, |
|
|
|
plugins: [ |
|
|
|
plugins: [ |
|
|
|
new webpack.DefinePlugin({ |
|
|
|
new webpack.DefinePlugin({ |
|
|
|
'process.env': config.dev.env, |
|
|
|
'process.env': config.dev.env |
|
|
|
'DEPENDENCIES': JSON.stringify(dependencies) |
|
|
|
|
|
|
|
}), |
|
|
|
}), |
|
|
|
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
|
|
|
|
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
|
|
|
|
new webpack.HotModuleReplacementPlugin(), |
|
|
|
new webpack.HotModuleReplacementPlugin(), |
|
|
|