fix: remove unused client nodes if CSR is disabled#15936
Conversation
🦋 Changeset detectedLatest commit: b40014f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I don't think this is right. And it's not like we can opt out of client-side navigation in those cases, because we would need to either a) store the information about which pages have So I think the only time we would want to get rid of these files is if we know that all routes are |
Ah yeah, I overlooked that.
Skipping the client build might be a little tricky. We still use the CSS files generated from that build, which is also why we couldn’t simply omit the nodes from the client build but had to delete them after the build. |
|
Ah. We don't generate CSS files during the server build? |
|
We do but our current logic parses the client manifest to associate the client stylesheets with the route. Let me see if I can rework that to use the server stylesheets instead... |
closes #9703
Seeing if we can remove client nodes if they're unused. Disabling CSR in combination with server-side resolution should help obscure routes.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits