-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Allow extract css files specified in 'css' option #22018
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
Comments
Totally agree, Inline CSS should not be the only option. |
Is there a temporary workaround available for this issue in the meantime? |
Downgrade to 3.5.3 |
Related: vitejs/vite#11864 |
https://nuxt.com/docs/guide/going-further/experimental-features#inlinessrstyles |
Would you try this? export default defineNuxtConfig({
features: {
inlineStyles: id => !id?.includes('entry')
}
}) This should avoid inlining the entry CSS (i.e. global CSS) but still inline any individual CSS from components. |
Describe the feature
Currently, the CSS files specified in the
css
option are injected using JavaScript. It would be beneficial if these CSS files could be extracted and utilized through thelink
element instead.The reason behind this request is that my CSS file is quite large, and by not using the element, the styles are not displayed immediately during the page load.
I understand that I can use the
app.head.link
option, but unfortunately, this doesn't include the compilation of SCSS files, and I am unable to benefit from assets compiling.Additional information
Final checks
The text was updated successfully, but these errors were encountered: