Skip to content

Examples

This section contains example projects demonstrating how to use rollup-plugin-require-css.

Online Examples

Try the plugin online with StackBlitz or CodeSandbox:

ExampleDescriptionLink
BasicBasic CSS import and bundlingStackBlitz
CSS ModulesScoped CSS with CSS ModulesStackBlitz
PreprocessorsSass, Less, and StylusStackBlitz
PostCSSPostCSS with autoprefixerStackBlitz
Code SplittingSplit CSS by entryStackBlitz
Shadow DOMConstructable stylesheetsStackBlitz

Local Examples

Clone the repository and try the examples locally:

bash
git clone https://github.com/saqqdy/rollup-plugin-require-css.git
cd rollup-plugin-require-css/examples/basic
pnpm install
pnpm run build
cat dist/style.css

Feature Coverage

Featurebasiccss-modulespreprocessorspostcsscode-splittingshadow-dom
CSS import
CSS Modules----
Sass/SCSS-----
Less-----
Stylus-----
PostCSS-----
Code splitting-----
Shadow DOM-----
Source maps-
Minification----

Released under the MIT License.