Fix production dynamic-page modules and trusted email previews
This commit is contained in:
1 parent
bccbf1f4c9
commit
646814d6df
9 files changed
+149
-9
No files matched your search
@@ -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`);
|
||||
|
||||
|
||||
Reference in new issue
Block a user