Skip to content

Commit

Permalink
wip: throw unexpected case
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Nov 29, 2024
1 parent 1a60bca commit f8d2214
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/waku/src/lib/plugins/vite-plugin-rsc-delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ export function rscDelegatePlugin(
// auto generated file by fsRouterTypegenPlugin
return [];
}
if (ctx.file.includes('pages.gen')) {
throw new Error('Unexpected ctx.file: ' + ctx.file);
}
await updateAllStyles(); // FIXME is this too aggressive?
if (moduleImports.has(ctx.file)) {
// re-inject
Expand Down
3 changes: 3 additions & 0 deletions packages/waku/src/lib/plugins/vite-plugin-rsc-hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ export function rscHmrPlugin(): Plugin {
// auto generated file by fsRouterTypegenPlugin
return [];
}
if (file.includes('pages.gen')) {
throw new Error('Unexpected file: ' + file);
}
const moduleLoading = (globalThis as any).__WAKU_CLIENT_MODULE_LOADING__;
const moduleCache = (globalThis as any).__WAKU_CLIENT_MODULE_CACHE__;
if (!moduleLoading || !moduleCache) {
Expand Down

0 comments on commit f8d2214

Please sign in to comment.