Include server-served client runtimes in asset cache version
This commit is contained in:
1 parent
c3818f0041
commit
0a17867ae7
3 files changed
+8
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/cli",
|
||||
"version": "0.8.73",
|
||||
"version": "0.8.74",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
} from "node:fs";
|
||||
import { basename, dirname, extname, join, relative, resolve } from "node:path";
|
||||
import { buildRouter, type Route } from "@wrnexus/router";
|
||||
import { getComponentControllerRuntime, getReactiveRuntime } from "@wrnexus/csr";
|
||||
import { getComponentControllerRuntime, getReactiveRuntime, getNavRuntime, getActionRuntime, getRealtimeRuntime } from "@wrnexus/csr";
|
||||
import { getIslandRuntime } from "@wrnexus/react/runtime";
|
||||
import {
|
||||
analyzeRuntimeImports,
|
||||
@@ -490,6 +490,11 @@ export async function runBuild(appRoot: string): Promise<void> {
|
||||
console.log(`✓ Partial shells: ${partialShells.size} build-time route shell(s)`);
|
||||
}
|
||||
const assetHash = createHash("sha256");
|
||||
// These runtimes are served from the framework rather than emitted files,
|
||||
// but share the immutable asset URL version and must invalidate it too.
|
||||
assetHash.update(getNavRuntime());
|
||||
assetHash.update(getActionRuntime());
|
||||
assetHash.update(getRealtimeRuntime());
|
||||
for (const file of clientFiles.values()) assetHash.update(readFileSync(file));
|
||||
if (clientFiles.size) console.log(`✓ Client modules: ${clientFiles.size} bundled module(s)`);
|
||||
const emittedPluginAssets = await emitPluginAssets(
|
||||
|
||||
Reference in new issue
Block a user