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

Support experimental-vite-env-api #85

Merged
merged 3 commits into from
Feb 26, 2025
Merged

Support experimental-vite-env-api #85

merged 3 commits into from
Feb 26, 2025

Conversation

rphlmr
Copy link
Owner

@rphlmr rphlmr commented Feb 20, 2025

This update adds the capability for the plugin to read the React Router future flags.

If unstable_viteEnvironmentApi is enabled, then we return a compatible configuration using Vite environments.

Copy link

pkg-pr-new bot commented Feb 20, 2025

Open in Stackblitz

npm i https://pkg.pr.new/rphlmr/react-router-hono-server@85

commit: f4e0d99

@rphlmr rphlmr changed the title wip experimental-vite-env-api Feb 20, 2025
@rphlmr rphlmr self-assigned this Feb 21, 2025
@rphlmr rphlmr changed the title experimental-vite-env-api Support experimental-vite-env-api Feb 26, 2025
@rphlmr
Copy link
Owner Author

rphlmr commented Feb 26, 2025

@AlemTuzlak If you don't mind quickly testing 🙏

@pawelblaszczyk5
Copy link

Seems to be working correctly in my app - with both, enabled and disabled environment API 😃

@AlemTuzlak
Copy link
Collaborator

@pawelblaszczyk5 you're on a mac right? do your asset fingerprints match across client/server?

@pawelblaszczyk5
Copy link

@pawelblaszczyk5 you're on a mac right? do your asset fingerprints match across client/server?

Yup, and yup

image

Are you using Tailwind 4 maybe? I've heard that this happens, due to how discovery works with it

@AlemTuzlak
Copy link
Collaborator

@pawelblaszczyk5 I am, that's the weird thing, it works without this plugin, but doesn't when you add it to the vite config, trying to figure out the root cause atm

@pawelblaszczyk5
Copy link

@AlemTuzlak Are you up to date with Tailwind 4? I recall they did some adjustments on their side in one of the recent releases (this/previous week I think) - maybe that's solved on their side?

@AlemTuzlak
Copy link
Collaborator

@pawelblaszczyk5 that actually fixed it! thanks man, 4.0.9 of tw doesn't cause doubled fingerprinted assets

@rphlmr rphlmr merged commit d0f0f68 into main Feb 26, 2025
5 checks passed
@rphlmr rphlmr deleted the experimental-vite-env-api branch February 26, 2025 09:06
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.

3 participants