How to extract all CSS into one file in Nuxt?
P粉208286791
2023-08-29 22:35:21
<p>I'm currently building a UI kit for a client that uses ASP.NET as the main application/backend for their project. The UI kit I'm building is created using NuxtJS and I want to compile all the SCSS files with Bootstrap into a single compiled CSS file, from what I gathered on the Nuxt documentation they recommend compiling the SCSS files into a single compiled CSS file for each The component's CSS file. </p>
<p>Before I start messing with the config files, is there a way to compile them into a single file so that the client can enqueue it? It doesn't need to be the most performant, which is why we push it to a single file. </p>
This is the part of the documentation specific to Nuxt2, I quote
nuxt.config.js
This part was not written directly, but is still available for Nuxt3, so I guess it should work in a similar way.
There is onlyone discussion on Nuxt3's repository, but you can start trying out the snippets already above to see if it meets some of your needs.