build: exclude electron output + local data dirs from Next file tracing

A previous packaged .app under dist-electron-builds/ carries its own
data/ tree, and output tracing tried to copy pieces of the OLD app into
the NEW standalone output during dist:mac ("Failed to copy traced
files..." warnings). Zero bytes actually leaked (the copies ENOENT'd),
but the failure mode — yesterday's build inside today's artifact — is
bad enough to fence off explicitly, same as ./repos already was.
This commit is contained in:
Bernd Rodler
2026-08-06 19:08:24 +02:00
parent 3bf36de0c8
commit 8ddb9c6dbd
+8 -1
View File
@@ -61,8 +61,15 @@ const nextConfig: NextConfig = {
// Sibling repos checked out under ./repos/ are unrelated source trees that
// Turbopack's NFT can otherwise rope into the trace when dynamic fs calls
// confuse it. Keeps the build from ballooning memory tracing dead code.
//
// dist-electron-builds/ is the OUTPUT of electron-builder — a previous
// packaged .app sitting there contains its own data/ tree, and tracing
// once tried to copy pieces of the old app into the new standalone output
// ("Failed to copy traced files ... dist-electron-builds/..." warnings,
// observed 2026-08-06). Same reasoning for ./data/, a dev-run server's
// local state dir.
outputFileTracingExcludes: {
"*": ["./repos/**/*"],
"*": ["./repos/**/*", "./dist-electron-builds/**/*", "./data/**/*"],
},
turbopack: {
root: import.meta.dirname,