Skip to content

Commit

Permalink
more hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Nov 18, 2024
1 parent 844420f commit 4738425
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/waku/src/lib/plugins/vite-plugin-rsc-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ export function rscTransformPlugin(
throw new Error('getClientId is only for server');
}
if (!opts.isBuild) {
if (id.startsWith(rootDir)) {
// HACK this logic is too heuristic
if (id.startsWith(rootDir) && !id.includes('?')) {
return id;
}
const origId = resolvedMap.get(id);
Expand All @@ -649,7 +650,8 @@ export function rscTransformPlugin(
};
const getServerId = (id: string): string => {
if (!opts.isBuild) {
if (id.startsWith(rootDir)) {
// HACK this logic is too heuristic
if (id.startsWith(rootDir) && !id.includes('?')) {
return id;
}
const origId = resolvedMap.get(id);
Expand Down

0 comments on commit 4738425

Please sign in to comment.