webpack.dev.js 783 B

12345678910111213141516171819202122232425262728293031
  1. const webpack = require('webpack')
  2. const merge = require('webpack-merge')
  3. const WriteFilePlugin = require('write-file-webpack-plugin')
  4. const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin')
  5. const common = require('./webpack.common.js')
  6. module.exports = merge(common, {
  7. mode: 'development',
  8. entry: {
  9. client: ['./client/index.js', 'webpack-hot-middleware/client']
  10. },
  11. output: {
  12. pathinfo: true
  13. },
  14. plugins: [
  15. new SimpleProgressWebpackPlugin({
  16. format: 'compact'
  17. }),
  18. new webpack.DefinePlugin({
  19. '__REACT_DEVTOOLS_GLOBAL_HOOK__': '({ isDisabled: true })'
  20. }),
  21. new WriteFilePlugin(),
  22. new webpack.HotModuleReplacementPlugin(),
  23. new webpack.WatchIgnorePlugin([
  24. /node_modules/
  25. ])
  26. ],
  27. watch: true
  28. })