CSS modules
This guide covers using CSS modules in your bud.js app.
By default, bud.js only ships with support for CSS.
However, support for CSS preprocessors can be added via extensions.
PostCSS
Support for PostCSS can be added to bud.js by installing the @roots/bud-postcss extension.
- npm
- Yarn
- pnpm
npm install @roots/bud-postcss --save-dev
yarn add @roots/bud-postcss --dev
pnpm add @roots/bud-postcss --save-dev
Once installed your stylesheets will be processed with postcss. The default configuration supports nested syntax, postcss-imports and autoprefixer.
Refer to the @roots/bud-postcss documentation for more information.
Sass
Support for Sass can be added to bud.js by installing the @roots/bud-sass extension.
- npm
- Yarn
- pnpm
npm install @roots/bud-sass --save-dev
yarn add @roots/bud-sass --dev
pnpm add @roots/bud-sass --save-dev
Once installed your .scss
and .sass
files will be processed with dart-sass.
Refer to the @roots/bud-sass documentation for more information.