webpack.config.js 728 B

12345678910111213141516171819202122232425262728293031323334
  1. // For instructions about this file refer to
  2. // webpack and webpack-hot-middleware documentation
  3. var webpack = require('webpack');
  4. var path = require('path');
  5. module.exports = {
  6. debug: true,
  7. devtool: '#eval-source-map',
  8. context: path.join(__dirname, 'app'),
  9. entry: [
  10. 'webpack/hot/dev-server',
  11. 'webpack-hot-middleware/client',
  12. './main'
  13. ],
  14. output: {
  15. path: path.join(__dirname, 'app'),
  16. publicPath: '/',
  17. filename: 'bundle.js'
  18. },
  19. plugins: [
  20. new webpack.optimize.OccurenceOrderPlugin(),
  21. new webpack.HotModuleReplacementPlugin(),
  22. new webpack.NoErrorsPlugin()
  23. ],
  24. module: {
  25. loaders: [
  26. { test: /\.js$/, exclude: /node_modules/, loaders: ['monkey-hot'] }
  27. ]
  28. }
  29. };