-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
FOUC on dev ssr #1287
Comments
Have you tried |
@wattanx vite.legacy: false succeeded, but compared with the webpack package, the page still flickers and displays no style first. This problem will not occur after webpack packaging. Nuxt 3 will not have this problem either. |
So I think the vite issue still exists. |
There may be a problem in the case of dev |
@wattanx You can try to use webpack to extract the style in the same way, and there will be no flickering. |
Rather than flickering, it should be a lag in enabling styles |
We'll look into it, but it will take time. memo: |
@wattanx I think we should reopen it and revise the title. Yes, you solve the problem of style flashing in #1308, but it has not solved the problem of flashing after Pord Build packaging. My configuration: export default defineNuxtConfig({
ssr: true,
sourcemap: true,
bridge: {
capi: true,
vite: { legacy: true },
nitro: true,
meta: true,
macros: { pageMeta: true },
},
vite: {
css: {
postcss: {
plugins: [tailwindcss(), autoprefixer()],
},
},
},
}); At present, this is the biggest reason that hinders me to continue to upgrade to Nuxt 3. Because there are a lot of dependence that needs to be upgraded. But this problem forced me to continue to use the |
@wattanx |
In addition, this seems to be the return of #561 |
<template>
<div>
<h1>test</h1>
</div>
</template>
<style>
h1 {
color: red;
}
</style>
|
Nuxt 3 writes the style of pages or components to the html head, and Nuxt bridge does not do this. This is why the page flickers after Nuxt bridge enables vite. example: https://stackblitz.com/~/github.com/medz/github-8bvs9l |
Could you create a new issue? (I might miss it otherwise) |
Yes 👉 #1334 |
Environment
Reproduction
Any Nuxt 2 project of Nuxt Bridge cannot extract css
Describe the bug
When the Nuxt 2 project was gradually upgraded using the bridge, it was found that after enabling Vite, all styles were style tags dynamically generated by JS and could not be extracted into separate css files. This caused the page to not display properly when loaded for the first time.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: