webpack.dev.js 651 B

123456789101112131415161718192021222324252627
  1. const webpack = require('webpack')
  2. const merge = require('webpack-merge')
  3. const ExtractTextPlugin = require('extract-text-webpack-plugin')
  4. const common = require('./webpack.common.js')
  5. module.exports = merge(common, {
  6. entry: {
  7. client: ['./client/index.js', 'webpack-hot-middleware/client']
  8. },
  9. output: {
  10. pathinfo: true,
  11. publicPath: '/'
  12. },
  13. plugins: [
  14. new webpack.DefinePlugin({
  15. 'process.env.NODE_ENV': JSON.stringify('development')
  16. }),
  17. new ExtractTextPlugin({ disable: true }),
  18. new webpack.HotModuleReplacementPlugin(),
  19. new webpack.WatchIgnorePlugin([
  20. /node_modules/
  21. ])
  22. ],
  23. watch: true
  24. })