webpack.config.js 831 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. entry: [
  9. './src/main'
  10. ],
  11. output: {
  12. path: path.join(__dirname, 'app'),
  13. publicPath: '/',
  14. filename: 'dist/bundle.js'
  15. },
  16. plugins: [
  17. new webpack.optimize.OccurenceOrderPlugin(),
  18. new webpack.NoErrorsPlugin()
  19. ],
  20. module: {
  21. loaders: [
  22. {
  23. loader: "babel-loader",
  24. // Only run `.js` and `.jsx` files through Babel
  25. test: /\.jsx?$/,
  26. exclude: /node_modules/,
  27. // Options to configure babel with
  28. query: {
  29. plugins: ['transform-runtime'],
  30. presets: ['es2015', 'stage-0'],
  31. }
  32. },
  33. ]
  34. }
  35. };