webpack.config.js 666 B

1234567891011121314151617181920212223242526
  1. const HtmlWebPackPlugin = require("html-webpack-plugin");
  2. const htmlPlugin = new HtmlWebPackPlugin({template: "./src/index.html", filename: "./index.html"});
  3. module.exports = {
  4. devServer: {
  5. allowedHosts: [
  6. '.bwlw.uk',
  7. 'localhost'
  8. ]
  9. },
  10. mode: 'development',
  11. module: {
  12. rules: [
  13. {
  14. test: /\.js$/,
  15. exclude: /node_modules/,
  16. use: {
  17. loader: "babel-loader"
  18. }
  19. }, {
  20. test: /\.css$/,
  21. use: ["style-loader", "css-loader"]
  22. }
  23. ]
  24. },
  25. plugins: [htmlPlugin]
  26. };