webpack.dev.js 866 B

1234567891011121314151617181920212223242526272829303132
  1. const webpack = require('webpack')
  2. const merge = require('webpack-merge')
  3. const ExtractTextPlugin = require('extract-text-webpack-plugin')
  4. const WriteFilePlugin = require('write-file-webpack-plugin')
  5. const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin')
  6. const common = require('./webpack.common.js')
  7. module.exports = merge(common, {
  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. 'process.env.NODE_ENV': JSON.stringify('development')
  20. }),
  21. new ExtractTextPlugin({ disable: true }),
  22. new WriteFilePlugin(),
  23. new webpack.HotModuleReplacementPlugin(),
  24. new webpack.WatchIgnorePlugin([
  25. /node_modules/
  26. ])
  27. ],
  28. watch: true
  29. })