webpack.development.js 423 B

123456789101112131415161718
  1. import path from "path";
  2. import { merge } from "webpack-merge";
  3. import common from "./webpack.common.js";
  4. import { fileURLToPath } from "url";
  5. const dirname = path.dirname(fileURLToPath(import.meta.url));
  6. export default merge(common, {
  7. mode: "development",
  8. watchOptions: {
  9. ignored: ["node_modules/**"],
  10. },
  11. devServer: {
  12. contentBase: path.join(dirname, "dist"),
  13. compress: true,
  14. port: 9000,
  15. },
  16. });