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.

36 lines
914 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. const HtmlWebPackPlugin = require("html-webpack-plugin");
  2. module.exports = {
  3. module: {
  4. rules: [
  5. {
  6. test: /\.(js|jsx)$/,
  7. exclude: /node_modules/,
  8. use: {
  9. loader: "babel-loader"
  10. }
  11. },
  12. {
  13. test: /\.html$/,
  14. use: [
  15. {
  16. loader: "html-loader"
  17. },
  18. ]
  19. },
  20. {
  21. test: /\.css$/,
  22. use: ['style-loader', 'css-loader'],
  23. },
  24. {
  25. test: /\.less$/,
  26. use: ['style-loader', 'css-loader', 'postcss-loader', 'less-loader'],
  27. }
  28. ]
  29. },
  30. plugins: [
  31. new HtmlWebPackPlugin({
  32. template: "./index.html",
  33. filename: "./index.html"
  34. })
  35. ]
  36. };