-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
21 lines (18 loc) · 879 Bytes
/
Copy pathnext.config.ts
File metadata and controls
21 lines (18 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// `sigmap` resolves its submodules at runtime via require(path.join(...)),
// which the bundler can't statically analyze. Keep it external so it's
// require()'d at runtime in the Node server runtime instead of bundled.
serverExternalPackages: ["sigmap"],
// The analyze/benchmark routes spawn sigmap's gen-context.js CLI and let it
// dynamically require its extractors. File tracing can't see those paths, so
// force the whole package into those functions' bundles.
outputFileTracingIncludes: {
"/api/analyze": ["./node_modules/sigmap/**"],
"/api/benchmark": ["./node_modules/sigmap/**"],
"/api/judge": ["./node_modules/sigmap/**"],
"/api/adapt": ["./node_modules/sigmap/**"],
"/api/cron/compare": ["./node_modules/sigmap/**"],
},
};
export default nextConfig;