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

Page/Component specific (S)CSS export / use #269

Closed
michelbio opened this issue Feb 16, 2017 · 3 comments
Closed

Page/Component specific (S)CSS export / use #269

michelbio opened this issue Feb 16, 2017 · 3 comments
Labels

Comments

@michelbio
Copy link

michelbio commented Feb 16, 2017

From my understanding, Nuxt builds everything into a single .CSS file as the output. Which is then used on all pages. We can define (S)CSS files/modules to be used site wide. And we can define (S)CSS files page/component specific.

But as far as I see, even if we specify @import on each page/component, eventually during production build everything gets merged into a single .CSS to be used on all pages.

In Vue.js without Nuxt, every page/view loads only the (S)CSS specified for the connected components. Given the static output of Nuxt, is it possible to achieve something like this within Nuxt and/or with Webpack?

This question is available on Nuxt.js community (#c236)
@Atinux
Copy link
Member

Atinux commented Feb 16, 2017

Hi @michelbio

We are aware about this and it's planned to render only the required CSS into the <head>.

See #12 (comment)

@michelbio
Copy link
Author

Thank you for quick reply on this.

@lock
Copy link

lock bot commented Nov 5, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 5, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants