webpack.config.js 580 B

12345678910111213141516171819202122232425262728
  1. var webpack = require('webpack');
  2. module.exports = {
  3. devtool: 'eval',
  4. entry: [
  5. 'webpack-dev-server/client?http://localhost:3000',
  6. 'webpack/hot/only-dev-server',
  7. './scripts/index'
  8. ],
  9. output: {
  10. path: __dirname + '/scripts/',
  11. filename: 'bundle.js',
  12. publicPath: '/scripts/'
  13. },
  14. plugins: [
  15. new webpack.HotModuleReplacementPlugin(),
  16. new webpack.NoErrorsPlugin()
  17. ],
  18. resolve: {
  19. extensions: ['', '.js']
  20. },
  21. module: {
  22. loaders: [
  23. { test: /\.js$/, loaders: ['react-hot', 'jsx?harmony'], exclude: /node_modules/ },
  24. ]
  25. }
  26. };