Skip to content

fix: remove flaky route treeshake cache#2171

Open
katywings wants to merge 1 commit into
mainfrom
fix-route-tailwind-hmr
Open

fix: remove flaky route treeshake cache#2171
katywings wants to merge 1 commit into
mainfrom
fix-route-tailwind-hmr

Conversation

@katywings

@katywings katywings commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

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

@katywings katywings self-assigned this Jun 27, 2026
@changeset-bot

changeset-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9c7abaf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

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

@netlify

netlify Bot commented Jun 27, 2026

Copy link
Copy Markdown

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 9c7abaf
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a48e02d6391f70008defa2a
😎 Deploy Preview https://deploy-preview-2171--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@katywings katywings marked this pull request as draft June 27, 2026 18:48
@pkg-pr-new

pkg-pr-new Bot commented Jun 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/start@2171
npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/vite-plugin-nitro-2@2171

commit: 9c7abaf

@katywings katywings force-pushed the fix-route-tailwind-hmr branch from 4ae882a to 4e71c9f Compare June 27, 2026 18:53
@katywings katywings force-pushed the fix-route-tailwind-hmr branch from 4e71c9f to 9c7abaf Compare July 4, 2026 10:27
@katywings katywings changed the title WIP: fix: remove flaky route treeshake cache fix: remove flaky route treeshake cache Jul 4, 2026
@katywings katywings marked this pull request as ready for review July 4, 2026 10:44
configureServer(s) {
server = s;
},
async handleHotUpdate(ctx) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what's the story about why we needed this again

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's a What did the removed code do? section in the PR description 😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh right 🤪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants