fix: remove flaky route treeshake cache#2171
Open
katywings wants to merge 1 commit into
Open
Conversation
🦋 Changeset detectedLatest commit: 9c7abaf 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 |
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
4ae882a to
4e71c9f
Compare
4e71c9f to
9c7abaf
Compare
lxsmnsyc
reviewed
Jul 4, 2026
| configureServer(s) { | ||
| server = s; | ||
| }, | ||
| async handleHotUpdate(ctx) { |
Member
There was a problem hiding this comment.
what's the story about why we needed this again
Contributor
Author
There was a problem hiding this comment.
There's a What did the removed code do? section in the PR description 😅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the current behavior?
Tailwind class changes in route files do not properly (hmr) update the tailwind styles.
Screencast_20260627_203645.mp4
What is the new behavior?
Tailwind class changes are applied correctly via hmr.
Screencast_20260627_203832.mp4
What did the removed code do?
Since this PR only removes code, it's fair to ask, what that removed code actually did:
The removed code included a cache optimization for route tree-shake babel transforms. Based on the logic, the cache however didn't reduce the actual amount of babel transforms, it only was used to silence/mute HMR events for unchanged mods via https://github.com/solidjs/solid-start/pull/2171/changes#diff-a43f34f42abb75b93b0894fd3cb7fe15a353a8f62b25d2f03b3dd52c506330ceL329. This logic however resulted in the silencing of HMR events necessary for tailwind to function properly.
Verdict: This three years old logic was introduced in Vinxi via nksaraf/vinxi@975a185#diff-9c9fee025366fdf03d3645a11a19d4444d9afb53a27a4d29fd72bf4f1c2c9309R8 and doesn't seem to provide any advantage these days, that's why I removed it completely. Maybe it was needed for older Vite versions.. I'd love to hear other opinions, especially from @nksaraf / @Brendonovich 😅.
Other information
Related issue: tailwindlabs/tailwindcss#19818