-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: partial support of server-client-mixed package + chore: add react-tweet demo #384
fix: partial support of server-client-mixed package + chore: add react-tweet demo #384
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
79a79b5
to
6391d04
Compare
d01eb84
to
4a1cd49
Compare
Run & review this pull request in StackBlitz Codeflow. commit: @hiogawa/react-server
@hiogawa/react-server-next
@hiogawa/transforms
@hiogawa/vite-plugin-ssr-middleware
|
// when using external library's server component includes client reference, | ||
// it will end up here with deps optimization hash `?v=` resolved by server module graph. | ||
// this is not entirely free from double module issue, | ||
// but it allows handling simple server-client-mixed package such as react-tweet. | ||
if (!manager.buildType && id.includes("?v=")) { | ||
id = id.split("?v=")[0]!; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ranted a lot, but probably we can just merge this since we already have similar hack somewhere too and this doesn't make any worse...
todo
?v=
(this still causes dual modules when client is imported from both server (no?v=
) and client (with?v=
)