webpack.config.dev.js 931 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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: 'source-map',
  8. context: path.join(__dirname, 'app', 'js'),
  9. entry: [
  10. 'webpack/hot/dev-server',
  11. 'webpack-hot-middleware/client',
  12. './main'
  13. ],
  14. output: {
  15. path: path.join(__dirname, 'app', 'js'),
  16. publicPath: '/js/',
  17. filename: 'bundle.js'
  18. },
  19. plugins: [
  20. new webpack.optimize.OccurenceOrderPlugin(),
  21. new webpack.HotModuleReplacementPlugin(),
  22. new webpack.NoErrorsPlugin()
  23. ],
  24. resolve: {
  25. extensions: ['', '.jsx', '.js']
  26. },
  27. module: {
  28. loaders: [
  29. {
  30. test: /\.jsx?$/,
  31. exclude: /node_modules/,
  32. loaders: ['babel']
  33. }
  34. ]
  35. }
  36. };