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
@@ -325,7 +325,7 @@
|
|||||||
},
|
},
|
||||||
"packages/cli": {
|
"packages/cli": {
|
||||||
"name": "@wrnexus/cli",
|
"name": "@wrnexus/cli",
|
||||||
"version": "0.8.73",
|
"version": "0.8.74",
|
||||||
"bin": {
|
"bin": {
|
||||||
"wrnexus": "src/index.ts",
|
"wrnexus": "src/index.ts",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@wrnexus/cli",
|
"name": "@wrnexus/cli",
|
||||||
"version": "0.8.73",
|
"version": "0.8.74",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
} from "node:fs";
|
} from "node:fs";
|
||||||
import { basename, dirname, extname, join, relative, resolve } from "node:path";
|
import { basename, dirname, extname, join, relative, resolve } from "node:path";
|
||||||
import { buildRouter, type Route } from "@wrnexus/router";
|
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 { getIslandRuntime } from "@wrnexus/react/runtime";
|
||||||
import {
|
import {
|
||||||
analyzeRuntimeImports,
|
analyzeRuntimeImports,
|
||||||
@@ -490,6 +490,11 @@ export async function runBuild(appRoot: string): Promise<void> {
|
|||||||
console.log(`✓ Partial shells: ${partialShells.size} build-time route shell(s)`);
|
console.log(`✓ Partial shells: ${partialShells.size} build-time route shell(s)`);
|
||||||
}
|
}
|
||||||
const assetHash = createHash("sha256");
|
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));
|
for (const file of clientFiles.values()) assetHash.update(readFileSync(file));
|
||||||
if (clientFiles.size) console.log(`✓ Client modules: ${clientFiles.size} bundled module(s)`);
|
if (clientFiles.size) console.log(`✓ Client modules: ${clientFiles.size} bundled module(s)`);
|
||||||
const emittedPluginAssets = await emitPluginAssets(
|
const emittedPluginAssets = await emitPluginAssets(
|
||||||
|
|||||||
Reference in new issue
Block a user