webpack.dev.js 680 B

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