From 481d1217cf7be83c699e4aad3e6e720cc139b362 Mon Sep 17 00:00:00 2001 From: Sauer Date: Sun, 4 Oct 2026 20:35:59 +0000 Subject: [PATCH] fix: the image leaves out the app's sources and tests Next's tracer copied every file under src into .next/standalone, 92 of them with 34 tests and the importer's fixtures, because of the config paths it cannot resolve at build time. The server runs its compiled bundles and reads nothing under src, so src is excluded from tracing. The Dockerfile still copies the importer's sources for import-kuma. Co-Authored-By: Claude Opus 5.5 (1M context) --- CHANGELOG.md | 6 ++++++ next.config.ts | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae81547..c35cfa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes are listed here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## Unreleased + +### Changed + +- The image leaves out the app's TypeScript sources and their tests, which the server never read. `import-kuma` keeps its own. + ## 0.5.0 - 2026-10-04 ### Added diff --git a/next.config.ts b/next.config.ts index bb918ac..98ef90f 100644 --- a/next.config.ts +++ b/next.config.ts @@ -9,9 +9,11 @@ const basePath = parseBasePath(process.env.BASE_PATH); const nextConfig: NextConfig = { output: "standalone", serverExternalPackages: ["better-sqlite3"], - // The server never reads the importer. The image copies the files it - // runs from on its own (see the Dockerfile), and its fixtures stay out. - outputFileTracingExcludes: { "**": ["src/lib/kuma/**"] }, + // The server runs its compiled bundles and reads no file under src. The + // tracer still took every file there, tests and the importer's fixtures + // included, from the config paths it cannot resolve at build time. The + // image copies the importer's sources on its own (see the Dockerfile). + outputFileTracingExcludes: { "**": ["src/**"] }, basePath, // Written into the app's code, server and browser, for src/lib/base-path.ts. env: { STATOSS_BASE_PATH: basePath },