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.

38 lines
866 B

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