webpack.config.js 456 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. const path = require("path");
  3. module.exports = {
  4. devtool: "inline-source-map",
  5. entry: "./js/index.js",
  6. mode: "development",
  7. output: {
  8. filename: "main.js",
  9. publicPath: "/dist/",
  10. path: path.resolve(__dirname, "dist"),
  11. },
  12. module: {
  13. rules: [],
  14. },
  15. resolve: {
  16. extensions: [".js"],
  17. },
  18. devServer: {
  19. static: {
  20. directory: path.join(__dirname, "./"),
  21. },
  22. compress: true,
  23. port: 8080,
  24. },
  25. };