fix: keep the production build's type check within 2 GB of memory #1431

This commit is contained in:
Linus Rath
2026-10-29 20:11:08 +01:00
parent a225109400
commit be28fb8ed7
2 changed files with 30 additions and 0 deletions
+6
View File
@@ -61,6 +61,12 @@ const nextConfig: NextConfig = {
// it from node_modules at runtime instead of trying to bundle it. Used by
// PLUGIN_DEV_DIR's on-the-fly bundler.
serverExternalPackages: ["esbuild"],
// The build's type check leaves out tests, which are a third of the files
// and push tsc past the default heap on a 4 GB machine (#1431).
// `npm run typecheck` still checks them with tsconfig.json.
typescript: {
tsconfigPath: "tsconfig.build.json",
},
// No proxyClientMaxBodySize: Next copies every body proxy.ts runs for up to
// that size before routing, so it stays at the 10 MB default. The routes
// that take bigger uploads (WOPI saves, WebDAV, /api/plugin-proxy) are left
+24
View File
@@ -0,0 +1,24 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"typeRoots": [
"./node_modules/@types"
]
},
"exclude": [
"node_modules",
"repos",
"local-data",
"examples",
"integration",
".next/dev/types",
"**/__tests__/**",
"**/*.test.ts",
"**/*.test.tsx",
"**/*.spec.ts",
"**/*.spec.tsx",
"vitest.config.ts",
"vitest.setup.ts",
"**/playwright*.config.ts"
]
}