@reckona/mreact-router 0.0.56 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +5 -0
- package/dist/build.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +15 -0
- package/dist/client.js.map +1 -1
- package/dist/module-runner.d.ts +2 -0
- package/dist/module-runner.d.ts.map +1 -1
- package/dist/module-runner.js +3 -1
- package/dist/module-runner.js.map +1 -1
- package/dist/render.d.ts +6 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +81 -40
- package/dist/render.js.map +1 -1
- package/dist/vite-plugin-cache-key.d.ts +3 -0
- package/dist/vite-plugin-cache-key.d.ts.map +1 -0
- package/dist/vite-plugin-cache-key.js +39 -0
- package/dist/vite-plugin-cache-key.js.map +1 -0
- package/package.json +11 -11
package/dist/render.js
CHANGED
|
@@ -25,6 +25,7 @@ import { emitRouterLog, logDurationMs, logNow } from "./logger.js";
|
|
|
25
25
|
import { createRouterRuntimeCacheCounters, readRouterRuntimeCacheEntry, routerRuntimeCacheStat, } from "./cache-stats.js";
|
|
26
26
|
import { bundleRouterModule } from "./bundle-pipeline.js";
|
|
27
27
|
import { routeSecurityHeaders } from "./security-headers.js";
|
|
28
|
+
import { vitePluginsCacheKey } from "./vite-plugin-cache-key.js";
|
|
28
29
|
import { invokeRouterInstrumentation, traceContextFromRequest, } from "./trace.js";
|
|
29
30
|
const nativeEscapeTransform = {
|
|
30
31
|
batchImportName: "escapeHtmlBatch",
|
|
@@ -47,6 +48,7 @@ export async function preloadBuiltRequestModules(options) {
|
|
|
47
48
|
serverModules: options.serverModules,
|
|
48
49
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
49
50
|
serverSourceFiles: options.serverSourceFiles,
|
|
51
|
+
vitePlugins: options.vitePlugins,
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
}
|
|
@@ -71,6 +73,7 @@ export async function preloadBuiltRequestModules(options) {
|
|
|
71
73
|
clientRouteInferenceCache,
|
|
72
74
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
73
75
|
serverSourceFiles: options.serverSourceFiles,
|
|
76
|
+
vitePlugins: options.vitePlugins,
|
|
74
77
|
});
|
|
75
78
|
await preloadBuiltPageRouteModules({
|
|
76
79
|
...options,
|
|
@@ -87,6 +90,7 @@ export async function preloadBuiltRequestModules(options) {
|
|
|
87
90
|
importPolicy: options.importPolicy,
|
|
88
91
|
serverModules: options.serverModules,
|
|
89
92
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
93
|
+
vitePlugins: options.vitePlugins,
|
|
90
94
|
});
|
|
91
95
|
}
|
|
92
96
|
}
|
|
@@ -106,7 +110,7 @@ async function preloadBuiltPageRouteModules(options) {
|
|
|
106
110
|
serverOutput: "string",
|
|
107
111
|
});
|
|
108
112
|
assertNoFatalServerDiagnostics(options.file, stringOutput.diagnostics);
|
|
109
|
-
await loadServerModule(stringOutput.code, options.file, options.serverModules, options.serverModuleCacheVersion);
|
|
113
|
+
await loadServerModule(stringOutput.code, options.file, options.serverModules, options.serverModuleCacheVersion, options.vitePlugins);
|
|
110
114
|
}
|
|
111
115
|
if (options.analysis.streamRoute) {
|
|
112
116
|
const streamOutput = transformServerModule({
|
|
@@ -118,7 +122,7 @@ async function preloadBuiltPageRouteModules(options) {
|
|
|
118
122
|
serverAwaitHydration: options.analysis.clientInference.client,
|
|
119
123
|
});
|
|
120
124
|
assertNoFatalServerDiagnostics(options.file, streamOutput.diagnostics);
|
|
121
|
-
await loadServerStreamModule(streamOutput.code, options.file, options.serverModules, options.serverModuleCacheVersion);
|
|
125
|
+
await loadServerStreamModule(streamOutput.code, options.file, options.serverModules, options.serverModuleCacheVersion, options.vitePlugins);
|
|
122
126
|
}
|
|
123
127
|
await preloadShellModulesForPage({
|
|
124
128
|
appDir: options.appDir,
|
|
@@ -126,6 +130,7 @@ async function preloadBuiltPageRouteModules(options) {
|
|
|
126
130
|
serverModules: options.serverModules,
|
|
127
131
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
128
132
|
serverSourceFiles: options.serverSourceFiles,
|
|
133
|
+
vitePlugins: options.vitePlugins,
|
|
129
134
|
});
|
|
130
135
|
if (!hasGenerateMetadataExport(options.code)) {
|
|
131
136
|
await loadComposedRouteMetadata({
|
|
@@ -142,6 +147,7 @@ async function preloadBuiltPageRouteModules(options) {
|
|
|
142
147
|
serverModules: options.serverModules,
|
|
143
148
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
144
149
|
serverSourceFiles: options.serverSourceFiles,
|
|
150
|
+
vitePlugins: options.vitePlugins,
|
|
145
151
|
});
|
|
146
152
|
}
|
|
147
153
|
}
|
|
@@ -156,7 +162,7 @@ async function preloadShellModulesForPage(options) {
|
|
|
156
162
|
serverOutput: "string",
|
|
157
163
|
});
|
|
158
164
|
assertNoFatalServerDiagnostics(shell.file, output.diagnostics);
|
|
159
|
-
await loadServerModule(output.code, shell.file, options.serverModules, options.serverModuleCacheVersion);
|
|
165
|
+
await loadServerModule(output.code, shell.file, options.serverModules, options.serverModuleCacheVersion, options.vitePlugins);
|
|
160
166
|
}
|
|
161
167
|
}
|
|
162
168
|
function fatalServerDiagnostics(diagnostics) {
|
|
@@ -350,6 +356,7 @@ async function renderAppRequestInternal(options) {
|
|
|
350
356
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
351
357
|
serverSourceFiles: options.serverSourceFiles,
|
|
352
358
|
timing,
|
|
359
|
+
vitePlugins: options.vitePlugins,
|
|
353
360
|
});
|
|
354
361
|
finishRenderTimingPhase(timing, phaseStartedAt, "middlewareMs");
|
|
355
362
|
if (middlewareResult.type === "response") {
|
|
@@ -392,6 +399,7 @@ async function renderAppRequestInternal(options) {
|
|
|
392
399
|
serverModules: options.serverModules,
|
|
393
400
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
394
401
|
serverSourceFiles: options.serverSourceFiles,
|
|
402
|
+
vitePlugins: options.vitePlugins,
|
|
395
403
|
status: 404,
|
|
396
404
|
textFallback: "Not Found",
|
|
397
405
|
});
|
|
@@ -417,6 +425,7 @@ async function renderAppRequestInternal(options) {
|
|
|
417
425
|
serverModules: options.serverModules,
|
|
418
426
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
419
427
|
serverSourceFiles: options.serverSourceFiles,
|
|
428
|
+
vitePlugins: options.vitePlugins,
|
|
420
429
|
});
|
|
421
430
|
}
|
|
422
431
|
if (matched.route.kind === "server") {
|
|
@@ -429,6 +438,7 @@ async function renderAppRequestInternal(options) {
|
|
|
429
438
|
serverModules: options.serverModules,
|
|
430
439
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
431
440
|
serverSourceFiles: options.serverSourceFiles,
|
|
441
|
+
vitePlugins: options.vitePlugins,
|
|
432
442
|
});
|
|
433
443
|
}
|
|
434
444
|
// Issue 080: page routes render HTML for GET / HEAD only. Other
|
|
@@ -465,6 +475,7 @@ async function renderAppRequestInternal(options) {
|
|
|
465
475
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
466
476
|
serverSourceFiles: options.serverSourceFiles,
|
|
467
477
|
timing,
|
|
478
|
+
vitePlugins: options.vitePlugins,
|
|
468
479
|
});
|
|
469
480
|
finishRenderTimingPhase(timing, phaseStartedAt, "sourceAnalysisMs");
|
|
470
481
|
const cachePolicy = originalAnalysis.cachePolicy;
|
|
@@ -504,6 +515,7 @@ async function renderAppRequestInternal(options) {
|
|
|
504
515
|
clientRouteInferenceCache,
|
|
505
516
|
serverModuleCacheVersion: undefined,
|
|
506
517
|
serverSourceFiles: options.serverSourceFiles,
|
|
518
|
+
vitePlugins: options.vitePlugins,
|
|
507
519
|
});
|
|
508
520
|
finishRenderTimingPhase(timing, phaseStartedAt, "routeCodeAnalysisMs");
|
|
509
521
|
const routeCode = routeAnalysis.routeCode;
|
|
@@ -528,6 +540,7 @@ async function renderAppRequestInternal(options) {
|
|
|
528
540
|
routePath: matched.route.path,
|
|
529
541
|
serverModules: options.serverModules,
|
|
530
542
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
543
|
+
vitePlugins: options.vitePlugins,
|
|
531
544
|
timing,
|
|
532
545
|
})
|
|
533
546
|
: undefined;
|
|
@@ -598,7 +611,7 @@ async function renderAppRequestInternal(options) {
|
|
|
598
611
|
params: matched.params,
|
|
599
612
|
queryClient,
|
|
600
613
|
request: options.request,
|
|
601
|
-
}, matched.route.file, options.serverModules, options.serverModuleCacheVersion));
|
|
614
|
+
}, matched.route.file, options.serverModules, options.serverModuleCacheVersion, options.vitePlugins));
|
|
602
615
|
const pageHtml = renderedPage.html;
|
|
603
616
|
const pageHtmlForLayout = clientRoute
|
|
604
617
|
? withHydrationMarkers({
|
|
@@ -635,6 +648,7 @@ async function renderAppRequestInternal(options) {
|
|
|
635
648
|
serverSourceFiles: options.serverSourceFiles,
|
|
636
649
|
clientRouteInferenceCache,
|
|
637
650
|
timing,
|
|
651
|
+
vitePlugins: options.vitePlugins,
|
|
638
652
|
}));
|
|
639
653
|
const metadata = await loadComposedRouteMetadata({
|
|
640
654
|
appDir: options.appDir,
|
|
@@ -650,6 +664,7 @@ async function renderAppRequestInternal(options) {
|
|
|
650
664
|
serverModules: options.serverModules,
|
|
651
665
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
652
666
|
serverSourceFiles: options.serverSourceFiles,
|
|
667
|
+
vitePlugins: options.vitePlugins,
|
|
653
668
|
});
|
|
654
669
|
html = injectHeadMetadata(html, metadata);
|
|
655
670
|
html = injectAuthSessionClaims(html, originalAnalysis.authIncludesClaims ? currentAuthClaims() : undefined);
|
|
@@ -718,6 +733,7 @@ async function renderAppRequestInternal(options) {
|
|
|
718
733
|
serverModules: options.serverModules,
|
|
719
734
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
720
735
|
serverSourceFiles: options.serverSourceFiles,
|
|
736
|
+
vitePlugins: options.vitePlugins,
|
|
721
737
|
clientRouteInferenceCache,
|
|
722
738
|
script: clientScript,
|
|
723
739
|
clientReferenceManifest: output.metadata.clientReferenceManifest,
|
|
@@ -747,6 +763,7 @@ async function renderAppRequestInternal(options) {
|
|
|
747
763
|
serverModules: options.serverModules,
|
|
748
764
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
749
765
|
serverSourceFiles: options.serverSourceFiles,
|
|
766
|
+
vitePlugins: options.vitePlugins,
|
|
750
767
|
clientRouteInferenceCache,
|
|
751
768
|
clientRoute,
|
|
752
769
|
script: clientScript,
|
|
@@ -795,7 +812,7 @@ async function renderAppRequestInternal(options) {
|
|
|
795
812
|
params: matched.params,
|
|
796
813
|
queryClient,
|
|
797
814
|
request: options.request,
|
|
798
|
-
}, matched.route.file, options.serverModules, options.serverModuleCacheVersion, timing));
|
|
815
|
+
}, matched.route.file, options.serverModules, options.serverModuleCacheVersion, options.vitePlugins, timing));
|
|
799
816
|
finishRenderTimingPhase(timing, phaseStartedAt, "pageRenderMs");
|
|
800
817
|
const pageHtml = renderedPage.html;
|
|
801
818
|
// Wrap the page (not the full document) with the hydration marker so
|
|
@@ -839,6 +856,7 @@ async function renderAppRequestInternal(options) {
|
|
|
839
856
|
serverSourceFiles: options.serverSourceFiles,
|
|
840
857
|
clientRouteInferenceCache,
|
|
841
858
|
timing,
|
|
859
|
+
vitePlugins: options.vitePlugins,
|
|
842
860
|
}));
|
|
843
861
|
finishRenderTimingPhase(timing, phaseStartedAt, "layoutRenderMs");
|
|
844
862
|
phaseStartedAt = renderTimingPhaseStartedAt(timing);
|
|
@@ -856,6 +874,7 @@ async function renderAppRequestInternal(options) {
|
|
|
856
874
|
serverModules: options.serverModules,
|
|
857
875
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
858
876
|
serverSourceFiles: options.serverSourceFiles,
|
|
877
|
+
vitePlugins: options.vitePlugins,
|
|
859
878
|
});
|
|
860
879
|
finishRenderTimingPhase(timing, phaseStartedAt, "metadataMs");
|
|
861
880
|
phaseStartedAt = renderTimingPhaseStartedAt(timing);
|
|
@@ -911,6 +930,7 @@ async function renderAppRequestInternal(options) {
|
|
|
911
930
|
serverModules: options.serverModules,
|
|
912
931
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
913
932
|
serverSourceFiles: options.serverSourceFiles,
|
|
933
|
+
vitePlugins: options.vitePlugins,
|
|
914
934
|
navigation: recoveryRoute,
|
|
915
935
|
status: 404,
|
|
916
936
|
textFallback: "Not Found",
|
|
@@ -934,6 +954,7 @@ async function renderAppRequestInternal(options) {
|
|
|
934
954
|
serverModules: options.serverModules,
|
|
935
955
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
936
956
|
serverSourceFiles: options.serverSourceFiles,
|
|
957
|
+
vitePlugins: options.vitePlugins,
|
|
937
958
|
navigation: recoveryRoute,
|
|
938
959
|
status: 500,
|
|
939
960
|
textFallback: error instanceof Error ? error.message : String(error),
|
|
@@ -1110,7 +1131,7 @@ async function renderSpecialRoute(options) {
|
|
|
1110
1131
|
routeId: routeIdForPath(options.routePath ?? new URL(options.request.url).pathname),
|
|
1111
1132
|
traceId: traceContextFromRequest(options.request)?.traceId,
|
|
1112
1133
|
};
|
|
1113
|
-
const pageHtml = await renderServerFileToHtml(options.routeFile, props, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles);
|
|
1134
|
+
const pageHtml = await renderServerFileToHtml(options.routeFile, props, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles, options.vitePlugins);
|
|
1114
1135
|
const pageHtmlForLayout = options.navigation?.clientRoute === true
|
|
1115
1136
|
? withHydrationMarkers({
|
|
1116
1137
|
assetBaseUrl: options.assetBaseUrl,
|
|
@@ -1129,6 +1150,7 @@ async function renderSpecialRoute(options) {
|
|
|
1129
1150
|
serverModules: options.serverModules,
|
|
1130
1151
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
1131
1152
|
serverSourceFiles: options.serverSourceFiles,
|
|
1153
|
+
vitePlugins: options.vitePlugins,
|
|
1132
1154
|
});
|
|
1133
1155
|
return new Response(`<!DOCTYPE html>${clientNavigationHeadTags({
|
|
1134
1156
|
assetBaseUrl: options.assetBaseUrl,
|
|
@@ -1139,7 +1161,7 @@ async function renderSpecialRoute(options) {
|
|
|
1139
1161
|
status: options.status,
|
|
1140
1162
|
});
|
|
1141
1163
|
}
|
|
1142
|
-
async function renderServerFileToHtml(file, props, serverModules, serverModuleCacheVersion, serverSourceFiles) {
|
|
1164
|
+
async function renderServerFileToHtml(file, props, serverModules, serverModuleCacheVersion, serverSourceFiles, vitePlugins) {
|
|
1143
1165
|
const code = await readServerSourceFile(file, serverModuleCacheVersion, serverSourceFiles);
|
|
1144
1166
|
const output = transformServerModule({
|
|
1145
1167
|
code,
|
|
@@ -1151,7 +1173,7 @@ async function renderServerFileToHtml(file, props, serverModules, serverModuleCa
|
|
|
1151
1173
|
if (fatalDiagnostics.length > 0) {
|
|
1152
1174
|
throw new Error(formatServerDiagnostics(file, fatalDiagnostics));
|
|
1153
1175
|
}
|
|
1154
|
-
return runServerModule(output.code, props, file, serverModules, serverModuleCacheVersion);
|
|
1176
|
+
return runServerModule(output.code, props, file, serverModules, serverModuleCacheVersion, vitePlugins);
|
|
1155
1177
|
}
|
|
1156
1178
|
function normalizeErrorForProps(error) {
|
|
1157
1179
|
if (error instanceof Error) {
|
|
@@ -1260,7 +1282,8 @@ async function dispatchMetadataRoute(options) {
|
|
|
1260
1282
|
return new Response("Invalid metadata route convention", { status: 500 });
|
|
1261
1283
|
}
|
|
1262
1284
|
async function loadServerRouteModule(options) {
|
|
1263
|
-
if (options.serverModuleCacheVersion === undefined
|
|
1285
|
+
if (options.serverModuleCacheVersion === undefined &&
|
|
1286
|
+
(options.vitePlugins === undefined || options.vitePlugins.length === 0)) {
|
|
1264
1287
|
return await importAppRouterFileModule(options.file);
|
|
1265
1288
|
}
|
|
1266
1289
|
const code = await readServerSourceFile(options.file, options.serverModuleCacheVersion, options.serverSourceFiles);
|
|
@@ -1276,7 +1299,7 @@ async function loadServerRouteModule(options) {
|
|
|
1276
1299
|
});
|
|
1277
1300
|
}
|
|
1278
1301
|
const moduleCode = artifactCode !== undefined && artifactCode.sourceHash === codeHash ? artifactCode.code : code;
|
|
1279
|
-
const cacheKey = `server-route\0${options.file}\0${options.serverModuleCacheVersion}\0${codeHash}\0${memoizedHashText(moduleCode)}`;
|
|
1302
|
+
const cacheKey = `server-route\0${options.file}\0${options.serverModuleCacheVersion}\0${codeHash}\0${memoizedHashText(moduleCode)}\0${vitePluginsCacheKey(options.vitePlugins)}`;
|
|
1280
1303
|
const cached = readRouterRuntimeCacheEntry(serverRouteModuleCache, cacheKey, serverRouteModuleCacheCounters);
|
|
1281
1304
|
if (cached !== undefined) {
|
|
1282
1305
|
return cached;
|
|
@@ -1287,6 +1310,7 @@ async function loadServerRouteModule(options) {
|
|
|
1287
1310
|
label: `server-route:${options.file}`,
|
|
1288
1311
|
...(moduleCode === code ? { resolveDir: dirname(options.file) } : {}),
|
|
1289
1312
|
sourcefile: options.file,
|
|
1313
|
+
vitePlugins: options.vitePlugins,
|
|
1290
1314
|
}).catch((error) => {
|
|
1291
1315
|
serverRouteModuleCache.delete(cacheKey);
|
|
1292
1316
|
throw error;
|
|
@@ -1331,6 +1355,7 @@ async function runMiddleware(options) {
|
|
|
1331
1355
|
serverModules: options.serverModules,
|
|
1332
1356
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
1333
1357
|
serverSourceFiles: options.serverSourceFiles,
|
|
1358
|
+
vitePlugins: options.vitePlugins,
|
|
1334
1359
|
});
|
|
1335
1360
|
}
|
|
1336
1361
|
finally {
|
|
@@ -1429,7 +1454,7 @@ async function loadMiddlewareModule(options) {
|
|
|
1429
1454
|
(await readServerSourceFile(options.file, options.serverModuleCacheVersion, options.serverSourceFiles));
|
|
1430
1455
|
const cacheKey = options.serverModuleCacheVersion === undefined
|
|
1431
1456
|
? undefined
|
|
1432
|
-
: `middleware\0${options.appDir}\0${options.file}\0${options.serverModuleCacheVersion}\0${memoizedHashText(code)}\0${importPolicyCacheKey(options.importPolicy)}`;
|
|
1457
|
+
: `middleware\0${options.appDir}\0${options.file}\0${options.serverModuleCacheVersion}\0${memoizedHashText(code)}\0${importPolicyCacheKey(options.importPolicy)}\0${vitePluginsCacheKey(options.vitePlugins)}`;
|
|
1433
1458
|
if (cacheKey !== undefined) {
|
|
1434
1459
|
const cached = readRouterRuntimeCacheEntry(middlewareModuleCache, cacheKey, middlewareModuleCacheCounters);
|
|
1435
1460
|
if (cached !== undefined) {
|
|
@@ -1443,6 +1468,7 @@ async function loadMiddlewareModule(options) {
|
|
|
1443
1468
|
importPolicy: options.importPolicy,
|
|
1444
1469
|
prebuiltArtifact: prebuiltRequestModuleArtifact(options.serverModules, options.file, code),
|
|
1445
1470
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
1471
|
+
vitePlugins: options.vitePlugins,
|
|
1446
1472
|
}).catch((error) => {
|
|
1447
1473
|
if (cacheKey !== undefined) {
|
|
1448
1474
|
middlewareModuleCache.delete(cacheKey);
|
|
@@ -1467,6 +1493,7 @@ export async function bundleMiddlewareModuleCode(options) {
|
|
|
1467
1493
|
label: "Middleware",
|
|
1468
1494
|
}),
|
|
1469
1495
|
],
|
|
1496
|
+
vitePlugins: options.vitePlugins,
|
|
1470
1497
|
});
|
|
1471
1498
|
const compiled = output.code;
|
|
1472
1499
|
if (compiled === undefined) {
|
|
@@ -1488,15 +1515,17 @@ async function loadBundledMiddlewareModule(options) {
|
|
|
1488
1515
|
code: options.code,
|
|
1489
1516
|
file: options.file,
|
|
1490
1517
|
importPolicy: options.importPolicy,
|
|
1518
|
+
vitePlugins: options.vitePlugins,
|
|
1491
1519
|
}));
|
|
1492
1520
|
return importAppRouterSourceModule({
|
|
1493
1521
|
...(options.serverModuleCacheVersion === undefined
|
|
1494
1522
|
? {}
|
|
1495
1523
|
: {
|
|
1496
|
-
cacheKey: `middleware:${options.file}:${options.serverModuleCacheVersion}:${memoizedHashText(compiled)}`,
|
|
1524
|
+
cacheKey: `middleware:${options.file}:${options.serverModuleCacheVersion}:${memoizedHashText(compiled)}:${vitePluginsCacheKey(options.vitePlugins)}`,
|
|
1497
1525
|
}),
|
|
1498
1526
|
code: compiled,
|
|
1499
1527
|
label: `middleware:${options.file}`,
|
|
1528
|
+
vitePlugins: options.vitePlugins,
|
|
1500
1529
|
});
|
|
1501
1530
|
}
|
|
1502
1531
|
function middlewareMatches(config, pathname) {
|
|
@@ -1581,7 +1610,7 @@ async function analyzeRouteSource(options) {
|
|
|
1581
1610
|
finishRenderTimingPhase(options.timing, artifactStartedAt, "sourceAnalysisArtifactMs");
|
|
1582
1611
|
return analysis;
|
|
1583
1612
|
}
|
|
1584
|
-
const cacheKey = `${options.serverModuleCacheVersion ?? "dev"}\0${options.filename}\0${sourceHash}`;
|
|
1613
|
+
const cacheKey = `${options.serverModuleCacheVersion ?? "dev"}\0${options.filename}\0${sourceHash}\0${vitePluginsCacheKey(options.vitePlugins)}`;
|
|
1585
1614
|
const cached = readRouterRuntimeCacheEntry(routeSourceAnalysisCache, cacheKey, routeSourceAnalysisCacheCounters);
|
|
1586
1615
|
if (cached !== undefined) {
|
|
1587
1616
|
return cached;
|
|
@@ -1616,6 +1645,7 @@ async function analyzeRouteSourceUncached(options) {
|
|
|
1616
1645
|
code: routeCode,
|
|
1617
1646
|
filename: options.filename,
|
|
1618
1647
|
routePath: options.routePath,
|
|
1648
|
+
vitePlugins: options.vitePlugins,
|
|
1619
1649
|
});
|
|
1620
1650
|
return {
|
|
1621
1651
|
authIncludesClaims: authIncludesClaims(options.code),
|
|
@@ -1660,13 +1690,13 @@ function memoizedHashText(code) {
|
|
|
1660
1690
|
codeHashCache.set(code, hash);
|
|
1661
1691
|
return hash;
|
|
1662
1692
|
}
|
|
1663
|
-
async function runServerModule(code, props, sourcefile, serverModules, serverModuleCacheVersion) {
|
|
1664
|
-
const component = await loadServerComponent(code, sourcefile, serverModules, serverModuleCacheVersion);
|
|
1693
|
+
async function runServerModule(code, props, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins) {
|
|
1694
|
+
const component = await loadServerComponent(code, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins);
|
|
1665
1695
|
return component(props);
|
|
1666
1696
|
}
|
|
1667
|
-
async function runServerModuleWithSlots(code, props, sourcefile, serverModules, serverModuleCacheVersion, timing) {
|
|
1697
|
+
async function runServerModuleWithSlots(code, props, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins, timing) {
|
|
1668
1698
|
const moduleLoadStartedAt = renderTimingPhaseStartedAt(timing);
|
|
1669
|
-
const module = await loadServerModule(code, sourcefile, serverModules, serverModuleCacheVersion);
|
|
1699
|
+
const module = await loadServerModule(code, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins);
|
|
1670
1700
|
finishRenderTimingPhase(timing, moduleLoadStartedAt, "pageModuleLoadMs");
|
|
1671
1701
|
const component = selectServerComponent(module);
|
|
1672
1702
|
const componentStartedAt = renderTimingPhaseStartedAt(timing);
|
|
@@ -1680,7 +1710,7 @@ async function runServerModuleWithSlots(code, props, sourcefile, serverModules,
|
|
|
1680
1710
|
slots,
|
|
1681
1711
|
};
|
|
1682
1712
|
}
|
|
1683
|
-
async function loadServerModule(code, sourcefile, serverModules, serverModuleCacheVersion) {
|
|
1713
|
+
async function loadServerModule(code, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins) {
|
|
1684
1714
|
const artifact = serverModules?.get(sourcefile)?.string;
|
|
1685
1715
|
const codeHash = memoizedHashText(code);
|
|
1686
1716
|
const prebuiltCode = prebuiltServerComponentModuleCode(artifact, code, codeHash);
|
|
@@ -1696,7 +1726,7 @@ async function loadServerModule(code, sourcefile, serverModules, serverModuleCac
|
|
|
1696
1726
|
const moduleCode = prebuiltCode ?? code;
|
|
1697
1727
|
const cacheKey = serverModuleCacheVersion === undefined
|
|
1698
1728
|
? undefined
|
|
1699
|
-
: `server-component:${serverModuleCacheVersion}:${sourcefile}:${moduleCode === code ? codeHash : memoizedHashText(moduleCode)}`;
|
|
1729
|
+
: `server-component:${serverModuleCacheVersion}:${sourcefile}:${moduleCode === code ? codeHash : memoizedHashText(moduleCode)}:${vitePluginsCacheKey(vitePlugins)}`;
|
|
1700
1730
|
return await importAppRouterSourceModule({
|
|
1701
1731
|
cacheKey,
|
|
1702
1732
|
code: moduleCode,
|
|
@@ -1708,10 +1738,12 @@ async function loadServerModule(code, sourcefile, serverModules, serverModuleCac
|
|
|
1708
1738
|
dev: serverModuleCacheVersion === undefined,
|
|
1709
1739
|
serverModules,
|
|
1710
1740
|
serverOutput: "string",
|
|
1741
|
+
vitePlugins,
|
|
1711
1742
|
},
|
|
1712
1743
|
}
|
|
1713
1744
|
: {}),
|
|
1714
1745
|
sourcefile,
|
|
1746
|
+
vitePlugins,
|
|
1715
1747
|
});
|
|
1716
1748
|
}
|
|
1717
1749
|
function prebuiltServerComponentModuleCode(artifact, code, codeHash) {
|
|
@@ -1736,8 +1768,8 @@ async function importBuiltServerModuleFile(options) {
|
|
|
1736
1768
|
file: options.file,
|
|
1737
1769
|
});
|
|
1738
1770
|
}
|
|
1739
|
-
async function loadServerComponent(code, sourcefile, serverModules, serverModuleCacheVersion) {
|
|
1740
|
-
const module = await loadServerModule(code, sourcefile, serverModules, serverModuleCacheVersion);
|
|
1771
|
+
async function loadServerComponent(code, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins) {
|
|
1772
|
+
const module = await loadServerModule(code, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins);
|
|
1741
1773
|
return selectServerComponent(module);
|
|
1742
1774
|
}
|
|
1743
1775
|
function selectServerComponent(module) {
|
|
@@ -1764,8 +1796,9 @@ function runServerStreamModule(code, options) {
|
|
|
1764
1796
|
props: options.props,
|
|
1765
1797
|
serverModules: options.serverModules,
|
|
1766
1798
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
1799
|
+
vitePlugins: options.vitePlugins,
|
|
1767
1800
|
});
|
|
1768
|
-
const layoutShells = await layoutShellsForPage(options.appDir, options.pageFile, options.props, slots, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles, options.clientRouteInferenceCache);
|
|
1801
|
+
const layoutShells = await layoutShellsForPage(options.appDir, options.pageFile, options.props, slots, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles, options.clientRouteInferenceCache, options.vitePlugins);
|
|
1769
1802
|
const marker = options.clientRoute
|
|
1770
1803
|
? hydrationMarkerParts({
|
|
1771
1804
|
assetBaseUrl: options.assetBaseUrl,
|
|
@@ -1789,7 +1822,7 @@ function runServerStreamModule(code, options) {
|
|
|
1789
1822
|
sink.append(shell.prefix);
|
|
1790
1823
|
}
|
|
1791
1824
|
sink.append(marker?.prefix ?? "");
|
|
1792
|
-
await appendServerStreamModule(code, sink, options.props, options.pageFile, options.serverModules, options.serverModuleCacheVersion);
|
|
1825
|
+
await appendServerStreamModule(code, sink, options.props, options.pageFile, options.serverModules, options.serverModuleCacheVersion, options.vitePlugins);
|
|
1793
1826
|
sink.append(marker?.suffix ?? "");
|
|
1794
1827
|
for (const shell of [...layoutShells].reverse()) {
|
|
1795
1828
|
sink.append(shell.suffix);
|
|
@@ -1898,8 +1931,8 @@ async function runServerStreamModuleWithLoading(code, options) {
|
|
|
1898
1931
|
queryClient: options.queryClient,
|
|
1899
1932
|
request: options.request,
|
|
1900
1933
|
};
|
|
1901
|
-
const layoutShells = await layoutShellsForPage(options.appDir, options.pageFile, loadingProps, {}, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles, options.clientRouteInferenceCache);
|
|
1902
|
-
const loadingHtml = await renderServerFileToHtml(options.loadingFile, loadingProps, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles);
|
|
1934
|
+
const layoutShells = await layoutShellsForPage(options.appDir, options.pageFile, loadingProps, {}, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles, options.clientRouteInferenceCache, options.vitePlugins);
|
|
1935
|
+
const loadingHtml = await renderServerFileToHtml(options.loadingFile, loadingProps, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles, options.vitePlugins);
|
|
1903
1936
|
const marker = options.clientRoute
|
|
1904
1937
|
? hydrationMarkerParts({
|
|
1905
1938
|
assetBaseUrl: options.assetBaseUrl,
|
|
@@ -1929,7 +1962,7 @@ async function runServerStreamModuleWithLoading(code, options) {
|
|
|
1929
1962
|
params: options.params,
|
|
1930
1963
|
queryClient: options.queryClient,
|
|
1931
1964
|
request: options.request,
|
|
1932
|
-
}, options.pageFile, options.serverModules, options.serverModuleCacheVersion);
|
|
1965
|
+
}, options.pageFile, options.serverModules, options.serverModuleCacheVersion, options.vitePlugins);
|
|
1933
1966
|
}, {
|
|
1934
1967
|
placeholder(boundarySink) {
|
|
1935
1968
|
boundarySink.append(loadingHtml);
|
|
@@ -1968,8 +2001,8 @@ async function renderVisibleOutOfOrderFragment(sink, id, value, render, options)
|
|
|
1968
2001
|
await fragmentSink.drain();
|
|
1969
2002
|
sink.append(`<template data-mreact-oob-fragment="${escapeHtmlAttribute(id)}">${fragmentSink.toString()}</template>`);
|
|
1970
2003
|
}
|
|
1971
|
-
async function appendServerStreamModule(code, sink, props, sourcefile, serverModules, serverModuleCacheVersion) {
|
|
1972
|
-
const module = await loadServerStreamModule(code, sourcefile, serverModules, serverModuleCacheVersion);
|
|
2004
|
+
async function appendServerStreamModule(code, sink, props, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins) {
|
|
2005
|
+
const module = await loadServerStreamModule(code, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins);
|
|
1973
2006
|
const component = selectStreamComponent(module);
|
|
1974
2007
|
await component(sink, props);
|
|
1975
2008
|
}
|
|
@@ -1977,7 +2010,7 @@ async function renderServerStreamSlots(code, options) {
|
|
|
1977
2010
|
if (!hasRouteSlotsExport(code)) {
|
|
1978
2011
|
return {};
|
|
1979
2012
|
}
|
|
1980
|
-
const module = await loadServerStreamModule(code, options.pageFile, options.serverModules, options.serverModuleCacheVersion);
|
|
2013
|
+
const module = await loadServerStreamModule(code, options.pageFile, options.serverModules, options.serverModuleCacheVersion, options.vitePlugins);
|
|
1981
2014
|
if (module.slots === undefined) {
|
|
1982
2015
|
return {};
|
|
1983
2016
|
}
|
|
@@ -1997,7 +2030,7 @@ async function renderServerStreamSlots(code, options) {
|
|
|
1997
2030
|
function hasRouteSlotsExport(code) {
|
|
1998
2031
|
return /^\s*export\s+const\s+slots\s*=/m.test(code);
|
|
1999
2032
|
}
|
|
2000
|
-
async function loadServerStreamModule(code, sourcefile, serverModules, serverModuleCacheVersion) {
|
|
2033
|
+
async function loadServerStreamModule(code, sourcefile, serverModules, serverModuleCacheVersion, vitePlugins) {
|
|
2001
2034
|
const artifactCode = serverModules?.get(sourcefile)?.stream;
|
|
2002
2035
|
const codeHash = memoizedHashText(code);
|
|
2003
2036
|
const prebuiltCode = prebuiltServerComponentModuleCode(artifactCode, code, codeHash);
|
|
@@ -2013,7 +2046,7 @@ async function loadServerStreamModule(code, sourcefile, serverModules, serverMod
|
|
|
2013
2046
|
const moduleCode = prebuiltCode ?? code;
|
|
2014
2047
|
const cacheKey = serverModuleCacheVersion === undefined
|
|
2015
2048
|
? undefined
|
|
2016
|
-
: `server-stream-component:${serverModuleCacheVersion}:${sourcefile}:${moduleCode === code ? codeHash : memoizedHashText(moduleCode)}`;
|
|
2049
|
+
: `server-stream-component:${serverModuleCacheVersion}:${sourcefile}:${moduleCode === code ? codeHash : memoizedHashText(moduleCode)}:${vitePluginsCacheKey(vitePlugins)}`;
|
|
2017
2050
|
return await importAppRouterSourceModule({
|
|
2018
2051
|
cacheKey,
|
|
2019
2052
|
code: moduleCode,
|
|
@@ -2025,10 +2058,12 @@ async function loadServerStreamModule(code, sourcefile, serverModules, serverMod
|
|
|
2025
2058
|
dev: serverModuleCacheVersion === undefined,
|
|
2026
2059
|
serverModules,
|
|
2027
2060
|
serverOutput: "stream",
|
|
2061
|
+
vitePlugins,
|
|
2028
2062
|
},
|
|
2029
2063
|
}
|
|
2030
2064
|
: {}),
|
|
2031
2065
|
sourcefile,
|
|
2066
|
+
vitePlugins,
|
|
2032
2067
|
});
|
|
2033
2068
|
}
|
|
2034
2069
|
function selectStreamComponent(module) {
|
|
@@ -2044,7 +2079,7 @@ async function applyLayouts(options) {
|
|
|
2044
2079
|
let shellHasOutOfOrderBoundary = false;
|
|
2045
2080
|
const slotContext = createSlotRenderContext(options.slots);
|
|
2046
2081
|
for (const shell of layoutFiles.reverse()) {
|
|
2047
|
-
const rendered = await renderShellPrefixSuffix(options.appDir, shell, options.props, slotContext, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles, options.clientRouteInferenceCache, options.timing);
|
|
2082
|
+
const rendered = await renderShellPrefixSuffix(options.appDir, shell, options.props, slotContext, options.serverModules, options.serverModuleCacheVersion, options.serverSourceFiles, options.clientRouteInferenceCache, options.timing, options.vitePlugins);
|
|
2048
2083
|
shellHasOutOfOrderBoundary ||= rendered.hasOutOfOrderBoundary;
|
|
2049
2084
|
html = `${rendered.prefix}${html}${rendered.suffix}`;
|
|
2050
2085
|
}
|
|
@@ -2063,12 +2098,12 @@ async function applyLayouts(options) {
|
|
|
2063
2098
|
await sink.drain();
|
|
2064
2099
|
return sink.toString();
|
|
2065
2100
|
}
|
|
2066
|
-
async function layoutShellsForPage(appDir, pageFile, props, slots, serverModules, serverModuleCacheVersion, serverSourceFiles, clientRouteInferenceCache) {
|
|
2101
|
+
async function layoutShellsForPage(appDir, pageFile, props, slots, serverModules, serverModuleCacheVersion, serverSourceFiles, clientRouteInferenceCache, vitePlugins) {
|
|
2067
2102
|
const layoutFiles = await shellFilesForPage(appDir, pageFile, serverModuleCacheVersion);
|
|
2068
2103
|
const shells = [];
|
|
2069
2104
|
const slotContext = createSlotRenderContext(slots);
|
|
2070
2105
|
for (const shell of layoutFiles) {
|
|
2071
|
-
shells.push(await renderShellPrefixSuffix(appDir, shell, props, slotContext, serverModules, serverModuleCacheVersion, serverSourceFiles, clientRouteInferenceCache));
|
|
2106
|
+
shells.push(await renderShellPrefixSuffix(appDir, shell, props, slotContext, serverModules, serverModuleCacheVersion, serverSourceFiles, clientRouteInferenceCache, undefined, vitePlugins));
|
|
2072
2107
|
}
|
|
2073
2108
|
warnUnconsumedRouteSlots({
|
|
2074
2109
|
appDir,
|
|
@@ -2078,11 +2113,11 @@ async function layoutShellsForPage(appDir, pageFile, props, slots, serverModules
|
|
|
2078
2113
|
});
|
|
2079
2114
|
return shells;
|
|
2080
2115
|
}
|
|
2081
|
-
async function renderShellPrefixSuffix(appDir, shell, props, slotContext, serverModules, serverModuleCacheVersion, serverSourceFiles, clientRouteInferenceCache, timing) {
|
|
2116
|
+
async function renderShellPrefixSuffix(appDir, shell, props, slotContext, serverModules, serverModuleCacheVersion, serverSourceFiles, clientRouteInferenceCache, timing, vitePlugins) {
|
|
2082
2117
|
const hasNamedSlots = Object.keys(slotContext.namedSlots).length > 0;
|
|
2083
2118
|
const cacheKey = serverModuleCacheVersion === undefined || hasNamedSlots || shell.kind === "template"
|
|
2084
2119
|
? undefined
|
|
2085
|
-
: `${appDir}\0${shell.file}\0${serverModuleCacheVersion}`;
|
|
2120
|
+
: `${appDir}\0${shell.file}\0${serverModuleCacheVersion}\0${vitePluginsCacheKey(vitePlugins)}`;
|
|
2086
2121
|
if (cacheKey !== undefined) {
|
|
2087
2122
|
const cached = readRouterRuntimeCacheEntry(renderedShellCache, cacheKey, renderedShellCacheCounters);
|
|
2088
2123
|
if (cached !== undefined && cached !== "impure") {
|
|
@@ -2107,6 +2142,7 @@ async function renderShellPrefixSuffix(appDir, shell, props, slotContext, server
|
|
|
2107
2142
|
cache: clientRouteInferenceCache,
|
|
2108
2143
|
code: stripRouteClientOnlyExports(code),
|
|
2109
2144
|
filename: shell.file,
|
|
2145
|
+
vitePlugins,
|
|
2110
2146
|
});
|
|
2111
2147
|
for (const diagnostic of clientInference.diagnostics) {
|
|
2112
2148
|
console.warn(formatClientRouteInferenceDiagnostic(diagnostic));
|
|
@@ -2125,8 +2161,8 @@ async function renderShellPrefixSuffix(appDir, shell, props, slotContext, server
|
|
|
2125
2161
|
}
|
|
2126
2162
|
phaseStartedAt = renderTimingPhaseStartedAt(timing);
|
|
2127
2163
|
const component = shellUsesAwait
|
|
2128
|
-
? selectStreamComponent(await loadServerStreamModule(output.code, shell.file, serverModules, serverModuleCacheVersion))
|
|
2129
|
-
: await loadServerComponent(output.code, shell.file, serverModules, serverModuleCacheVersion);
|
|
2164
|
+
? selectStreamComponent(await loadServerStreamModule(output.code, shell.file, serverModules, serverModuleCacheVersion, vitePlugins))
|
|
2165
|
+
: await loadServerComponent(output.code, shell.file, serverModules, serverModuleCacheVersion, vitePlugins);
|
|
2130
2166
|
addRenderTimingPhaseDuration(timing, phaseStartedAt, "layoutModuleLoadMs");
|
|
2131
2167
|
phaseStartedAt = renderTimingPhaseStartedAt(timing);
|
|
2132
2168
|
const layoutHtml = shellUsesAwait
|
|
@@ -2505,7 +2541,7 @@ async function loadRouteDataWithInstrumentation(options) {
|
|
|
2505
2541
|
async function loadRouteLoaderModule(options) {
|
|
2506
2542
|
const cacheKey = options.serverModuleCacheVersion === undefined
|
|
2507
2543
|
? undefined
|
|
2508
|
-
: `${options.appDir}\0${options.filename}\0${options.serverModuleCacheVersion}\0${memoizedHashText(options.code)}\0${importPolicyCacheKey(options.importPolicy)}`;
|
|
2544
|
+
: `${options.appDir}\0${options.filename}\0${options.serverModuleCacheVersion}\0${memoizedHashText(options.code)}\0${importPolicyCacheKey(options.importPolicy)}\0${vitePluginsCacheKey(options.vitePlugins)}`;
|
|
2509
2545
|
if (cacheKey !== undefined) {
|
|
2510
2546
|
const cached = readRouterRuntimeCacheEntry(routeLoaderModuleCache, cacheKey, routeLoaderModuleCacheCounters);
|
|
2511
2547
|
if (cached !== undefined) {
|
|
@@ -2531,6 +2567,7 @@ export async function bundleRouteLoaderModuleCode(options) {
|
|
|
2531
2567
|
code: stripRouteLoaderOnlyExports(options.code),
|
|
2532
2568
|
filename: options.filename,
|
|
2533
2569
|
platform: "node",
|
|
2570
|
+
vitePlugins: options.vitePlugins,
|
|
2534
2571
|
plugins: [
|
|
2535
2572
|
fileImportMetaUrlPlugin(),
|
|
2536
2573
|
createAppRouterImportPolicyPlugin({
|
|
@@ -2560,6 +2597,7 @@ async function loadBundledRouteLoaderModule(options) {
|
|
|
2560
2597
|
code: options.code,
|
|
2561
2598
|
filename: options.filename,
|
|
2562
2599
|
importPolicy: options.importPolicy,
|
|
2600
|
+
vitePlugins: options.vitePlugins,
|
|
2563
2601
|
}));
|
|
2564
2602
|
return await importAppRouterSourceModule({
|
|
2565
2603
|
...(options.serverModuleCacheVersion === undefined
|
|
@@ -2643,6 +2681,7 @@ async function bundleRouteMetadataModuleCode(options) {
|
|
|
2643
2681
|
code: stripRouteMetadataOnlyExports(options.code),
|
|
2644
2682
|
filename: options.filename,
|
|
2645
2683
|
platform: "node",
|
|
2684
|
+
vitePlugins: options.vitePlugins,
|
|
2646
2685
|
plugins: [
|
|
2647
2686
|
fileImportMetaUrlPlugin(),
|
|
2648
2687
|
createAppRouterImportPolicyPlugin({
|
|
@@ -2661,7 +2700,7 @@ async function bundleRouteMetadataModuleCode(options) {
|
|
|
2661
2700
|
async function loadComposedRouteMetadata(options) {
|
|
2662
2701
|
const cacheKey = options.serverModuleCacheVersion === undefined
|
|
2663
2702
|
? undefined
|
|
2664
|
-
: `${options.appDir}\0${options.filename}\0${options.serverModuleCacheVersion}\0${memoizedHashText(options.code)}`;
|
|
2703
|
+
: `${options.appDir}\0${options.filename}\0${options.serverModuleCacheVersion}\0${memoizedHashText(options.code)}\0${vitePluginsCacheKey(options.vitePlugins)}`;
|
|
2665
2704
|
if (cacheKey !== undefined) {
|
|
2666
2705
|
const cached = readRouterRuntimeCacheEntry(composedRouteMetadataCache, cacheKey, composedRouteMetadataCacheCounters);
|
|
2667
2706
|
if (cached !== undefined) {
|
|
@@ -2700,6 +2739,7 @@ async function loadComposedRouteMetadataUncached(options) {
|
|
|
2700
2739
|
importPolicy: options.importPolicy,
|
|
2701
2740
|
serverModules: options.serverModules,
|
|
2702
2741
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
2742
|
+
vitePlugins: options.vitePlugins,
|
|
2703
2743
|
});
|
|
2704
2744
|
if (shellMetadata !== undefined) {
|
|
2705
2745
|
metadata.push(shellMetadata);
|
|
@@ -2713,6 +2753,7 @@ async function loadComposedRouteMetadataUncached(options) {
|
|
|
2713
2753
|
importPolicy: options.importPolicy,
|
|
2714
2754
|
serverModules: options.serverModules,
|
|
2715
2755
|
serverModuleCacheVersion: options.serverModuleCacheVersion,
|
|
2756
|
+
vitePlugins: options.vitePlugins,
|
|
2716
2757
|
});
|
|
2717
2758
|
if (pageMetadata !== undefined) {
|
|
2718
2759
|
metadata.push(pageMetadata);
|