diff --git a/docs/1.getting-started/4.styling.md b/docs/1.getting-started/4.styling.md index 58d28344f8..309cd09e65 100644 --- a/docs/1.getting-started/4.styling.md +++ b/docs/1.getting-started/4.styling.md @@ -258,6 +258,27 @@ export default defineNuxtConfig({ Nuxt uses Vite by default. If you wish to use webpack instead, refer to each preprocessor loader [documentation](https://webpack.js.org/loaders/sass-loader). +### Preprocessor Workers (Experimental) + +Vite has made available an [experimental option](https://vite.dev/config/shared-options.html#css-preprocessormaxworkers) which can speed up using preprocessors. + +You can enable this in your `nuxt.config`: + +```ts + +export default defineNuxtConfig({ + vite: { + css: { + preprocessorMaxWorkers: true // number of CPUs minus 1 + } + } +}) +``` + +::note +This is an experimental option and you should refer to the Vite documentation and [provide feedback](https://github.com/vitejs/vite/discussions/15835). +:: + ## Single File Components (SFC) Styling One of the best things about Vue and SFC is how great it is at naturally dealing with styling. You can directly write CSS or preprocessor code in the style block of your components file, therefore you will have fantastic developer experience without having to use something like CSS-in-JS. However if you wish to use CSS-in-JS, you can find 3rd party libraries and modules that support it, such as [pinceau](https://github.com/Tahul/pinceau).