Fix production dynamic-page modules and trusted email previews
Quality / quality (ubuntu-latest) (push) Canceled after 0s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-10-01 19:47:16 +05:30
1 parent bccbf1f4c9
commit 646814d6df
9 files changed
+149 -9

No files matched your search

+4 -1
View File
@@ -202,7 +202,10 @@ export async function runBuild(appRoot: string): Promise<void> {
.update(source)
.digest("hex")
.slice(0, 16);
const clientOut = join(clientModulesDir, `${basename(file, ".wrn")}-${clientHash}.mjs`);
// Dynamic route names contain brackets, which the production asset handler
// deliberately rejects. Keep public artifact names within its safe alphabet.
const clientStem = basename(file, ".wrn").replace(/[^A-Za-z0-9._-]/g, "_");
const clientOut = join(clientModulesDir, `${clientStem}-${clientHash}.mjs`);
const clientUrl = `/__wrnexus/client/${basename(clientOut)}`;
const clientEntry = join(compiledDir, `client${artifactId}.entry.mjs`);