-
-
Notifications
You must be signed in to change notification settings - Fork 130
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: do not SSR index page #573
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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. |
cdbf145
to
53bad46
Compare
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.
oh no, git checkout delete some of my changes
if (isStatic) { | ||
const moduleIds = await unstable_collectClientModules(input); | ||
path2moduleIds[pathname] = moduleIds; | ||
} |
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.
Hmm, I think we want to use path2moduleIds
for dynamic pages too (even though, it's suboptimal).
If unstable_collectClientModules
is only the place of the problem, it doesn't actually leak the information because it's thrown away.
That said, I wish there would be an alternative way to collect client modules without running the code. Can we statically analyze the code?
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.
Oh, yes we can. I read the React-server source code, we could collect client info during vite build
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.
my current idea is to add a hook on the resolve module function and give id -> moduleId[] Map in the analysis plugin
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.
that sounds nice. we may need some research, so this would come at v0.21 or later.
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.
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Let's start it over. |
Fixes: #543