Skip to content

Commit b20c305

Browse files
committed
chore: improve chunk error logging
1 parent b4e7d2c commit b20c305

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-router-dev/vite/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ const getReactRouterManifestBuildAssets = (
331331
prependedAssetFilePaths: string[] = []
332332
): ReactRouterManifest["entry"] & { css: string[] } => {
333333
let entryChunk = resolveChunk(ctx, viteManifest, entryFilePath);
334-
invariant(entryChunk, "Chunk not found");
334+
invariant(entryChunk, `Chunk not found: ${entryFilePath}`);
335335

336336
// This is here to support prepending client entry assets to the root route
337337
let prependedAssetChunks = prependedAssetFilePaths.map((filePath) => {
338338
let chunk = resolveChunk(ctx, viteManifest, filePath);
339-
invariant(chunk, "Chunk not found");
339+
invariant(chunk, `Chunk not found: ${filePath}`);
340340
return chunk;
341341
});
342342

0 commit comments

Comments
 (0)