Skip to content

fix(minimal/client): do not pass findSourceMapURL unnecessarily#1993

Merged
dai-shi merged 1 commit into
mainfrom
fix/do-not-overwrite-find-source-map-url
Mar 20, 2026
Merged

fix(minimal/client): do not pass findSourceMapURL unnecessarily#1993
dai-shi merged 1 commit into
mainfrom
fix/do-not-overwrite-find-source-map-url

Conversation

@dai-shi
Copy link
Copy Markdown
Member

@dai-shi dai-shi commented Mar 20, 2026

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
waku Ready Ready Preview Mar 20, 2026 4:14am

Request Review

@codesandbox-ci
Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 20, 2026

Open in StackBlitz

npm i https://pkg.pr.new/waku@1993

commit: 5976ab8

@dai-shi dai-shi added this to the v1.0.0-alpha.6 milestone Mar 20, 2026
@dai-shi dai-shi marked this pull request as ready for review March 20, 2026 04:15
Copy link
Copy Markdown
Collaborator

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useState,
} from 'react';
import type { ReactNode } from 'react';
import RSDWClient from 'react-server-dom-webpack/client';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed react-server-dom-webpack/client is imported but this always gets swapped @vitejs/plugin-rsc/browser so it should be fine.

enforce: 'pre',
resolveId(source, _importer, _options) {
if (source === 'react-server-dom-webpack/client') {
return '\0' + source;
}
},
load(id) {
if (id === '\0react-server-dom-webpack/client') {
if (this.environment.name === 'client') {
return `
import * as ReactClient from ${JSON.stringify(import.meta.resolve('@vitejs/plugin-rsc/browser'))};
export default ReactClient;
`;
}
return `export default {}`;
}
},

We should be able to actually rewrite this line directly, but think one issue is I need to type @vitejs/plugin-rsc/browser more thoroughly.

@dai-shi dai-shi merged commit 6e03040 into main Mar 20, 2026
29 checks passed
@dai-shi dai-shi deleted the fix/do-not-overwrite-find-source-map-url branch March 20, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants