Skip to content
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(rsc): only use web/src/entries.ts as the rscBuildAnalyze entry point #10218

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions packages/vite/src/rsc/rscBuildAnalyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,16 @@ export async function rscBuildAnalyze() {
build: {
manifest: 'rsc-build-manifest.json',
write: false,
ssr: true,
// TODO (RSC): In the future we want to generate the entries file
// automatically. Maybe by using `analyzeRoutes()`
// For the dev server we might need to generate these entries on the
// fly - so we will need something like a plugin or virtual module
// to generate these entries, rather than write to actual file.
// And so, we might as well use on-the-fly generation for regular
// builds too
ssr: rwPaths.web.entries,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Vite docs say we can just make this a string inline here instead of needing another config block so seeing if that'll go. See https://vitejs.dev/config/build-options#build-ssr.

rollupOptions: {
onwarn: onWarn,
input: {
// TODO (RSC): In the future we want to generate the entries file
// automatically. Maybe by using `analyzeRoutes()`
// For the dev server we might need to generate these entries on the
// fly - so we will need something like a plugin or virtual module
// to generate these entries, rather than write to actual file.
// And so, we might as well use on-the-fly generation for regular
// builds too
entries: rwPaths.web.entries,
},
},
},
})
Expand Down
Loading