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

feat: prevent fouc in development #12

Merged
merged 2 commits into from
Mar 25, 2024
Merged

feat: prevent fouc in development #12

merged 2 commits into from
Mar 25, 2024

Conversation

Julien-R44
Copy link
Member

@Julien-R44 Julien-R44 commented Mar 25, 2024

Breaking Changes

  • generateEntryPointsTags is now async

This PR prevents the FOUC that occurs in development when a user imports his CSS from javascript.

Sort of "backported" from adonisjs/inertia#5

The implementation is exactly the same, but made more generic. The adonisjs/inertia implementation can now be removed.

As a result, FOUC will be avoided on adonisjs+edge adonisjs+tsx and adonisjs+inertia stacks, without any additional code

Should close #10

@Julien-R44 Julien-R44 marked this pull request as ready for review March 25, 2024 21:28
@Julien-R44 Julien-R44 merged commit 15bef87 into next Mar 25, 2024
12 checks passed
@Julien-R44 Julien-R44 deleted the feat/avoid-fouc branch March 25, 2024 21:37
Julien-R44 added a commit to adonisjs/inertia that referenced this pull request Mar 25, 2024
As it now handled directly by adonisjs/vite. See adonisjs/vite#12
Julien-R44 added a commit that referenced this pull request Jun 2, 2024
* feat: prevent fouc in development

* fix: test failing on windows
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.

1 participant