You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
832 B

4 years ago
  1. const path = require('path');
  2. module.exports = {
  3. mode: "development",
  4. entry: './src/index.js',
  5. output: {
  6. filename: 'main.js',
  7. path: path.resolve(__dirname, 'dist')
  8. },
  9. devServer: {
  10. contentBase: './dist'
  11. },
  12. module: {
  13. rules: [
  14. {
  15. test: /\.css$/,
  16. use: [
  17. 'style-loader',
  18. 'css-loader'
  19. ]
  20. },
  21. {
  22. test: /\.(png|svg|jpg|gif|obj)$/,
  23. use: [
  24. 'file-loader'
  25. ]
  26. },
  27. {
  28. test: /\.js$/,
  29. exclude: /(node_modules|bower_components)/,
  30. use: {
  31. loader: 'babel-loader'
  32. }
  33. }
  34. ]
  35. }
  36. };