webpack.dev.js 739 B

1234567891011121314151617181920212223242526272829
  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 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 WriteFilePlugin(),
  20. new webpack.HotModuleReplacementPlugin(),
  21. new webpack.WatchIgnorePlugin([
  22. /node_modules/
  23. ])
  24. ],
  25. watch: true
  26. })