Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. const webpack = require('webpack');
  2. const path = require('path');
  3.  
  4. // including sass
  5. module.exports = [{
  6. entry: [
  7. 'eventsource-polyfill',
  8. 'webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true',
  9. './src/index'],
  10. output: {
  11. path: path.join(__dirname, '/public'),
  12. publicPath: '/',
  13. filename: 'bundle.js'
  14. },
  15. module: {
  16. // exclude: /node_modules/,
  17. loaders: [
  18. { test: /\.js?$/, loader: 'babel-loader', exclude: /node_modules/ },
  19. { test: /\.sass$/, loader: 'style-loader!css-loader!sass-loader', exclude: /node_modules/ },
  20. ]
  21. // query: {
  22. // presets: ["react", "es2015", "stage-1"]
  23. // }
  24. },
  25. resolve: {
  26. extensions: ['.js','.sass', ".jsx"]
  27. }
  28. ,devServer: {
  29. contentBase: './public',
  30. hot: true
  31. }
  32. ,plugins: [
  33. new webpack.HotModuleReplacementPlugin(),
  34. new webpack.ProvidePlugin({
  35. React: 'react',
  36. ReactDOM:'react-dom'
  37. }),
  38. new webpack.NoErrorsPlugin()
  39. // new webpack.NoEmitOnErrorsPlugin()
  40. ]
  41. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement