浏览代码

fix(config): add rewrite rule to handle missing installHook.js.map requests

vtugulan 6 月之前
父节点
当前提交
f6f29dfc78
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      next.config.ts

+ 8 - 0
next.config.ts

@@ -2,6 +2,14 @@ import type { NextConfig } from "next";
 
 const nextConfig: NextConfig = {
   output: "standalone",
+  async rewrites() {
+    return [
+      {
+        source: "/installHook.js.map",   // the request that raises 404
+        destination: "/404",             // serve a silent 404 response
+      },
+    ];
+  },
 };
 
 export default nextConfig;