Guest User

Untitled

a guest
Dec 11th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. var path = require('path')
  2. var webpack = require('webpack')
  3.  
  4. module.exports = {
  5. entry: [
  6. 'react-hot-loader/patch',
  7. 'webpack-hot-middleware/client',
  8. path.join(__dirname, '/../src/index.js'),
  9. // path.join(__dirname, '/../src/'),
  10. // path.join(__dirname, '/../src/setupTest.js'),
  11. // path.join(__dirname, '/../src/shim.js'),
  12. ],
  13. // entry: {
  14. // app: path.join(__dirname, '/../src/index.js')
  15. // },
  16. output: {
  17. filename: 'bundle.js',
  18. path: path.join(__dirname, '/../dist'),
  19. publicPath: '/static/'
  20. },
  21. devtool: 'inline-source-map',
  22. module: {
  23. rules: [
  24. {
  25. test: /\.jsx?$/,
  26. use: [
  27. 'babel-loader',
  28. ],
  29. exclude: /node_modules/,
  30. },
  31. {
  32. test: /\.scss/,
  33. use: [
  34. 'style-loader', {
  35. loader: 'css-loader',
  36. options: {
  37. sourceMap: true,
  38. },
  39. }, {
  40. loader: 'sass-loader',
  41. options: {
  42. sourceMap: true,
  43. includePaths: [path.join(__dirname, '/../src/assets/scss')],
  44. },
  45. },
  46. ],
  47. }
  48. ],
  49. },
  50.  
  51. plugins: [
  52. new webpack.HotModuleReplacementPlugin(),
  53. new webpack.NamedModulesPlugin(),
  54. new webpack.NoEmitOnErrorsPlugin()
  55. ],
  56.  
  57. devServer: {
  58. port: 8080,
  59. historyApiFallback: true,
  60. hot: true
  61. },
  62. }
Add Comment
Please, Sign In to add comment