griffel icon indicating copy to clipboard operation
griffel copied to clipboard

docs: add documentation or support for CSS extraction with rsbuild/rspack

Open chensid opened this issue 1 year ago • 2 comments

Description

Griffel is a powerful styling solution, and it works seamlessly with modern build tools. However, while rsbuild and rspack are becoming increasingly popular as webpack-compatible tools, there is no documentation or guidance on how to enable CSS extraction when using these tools with Griffel.

CSS extraction is a crucial feature for production builds, where styles are typically separated into standalone .css files for better performance and caching.

Expected Behavior

  • Clear instructions or built-in support to enable CSS extraction with rsbuild/rspack in projects using Griffel.

chensid avatar Nov 24 '24 15:11 chensid

@chensid our loader & plugins are compatible with Rspack out of the box. We also have a e2e test to run against Rspack, here is a minimal config: https://github.com/microsoft/griffel/blob/main/e2e/rspack/src/assets/rspack.config.js

However, I agree that having separate docs for Rspack would be great 🐱

layershifter avatar Nov 26 '24 10:11 layershifter

@chensid our loader & plugins are compatible with Rspack out of the box. We also have a e2e test to run against Rspack, here is a minimal config: https://github.com/microsoft/griffel/blob/main/e2e/rspack/src/assets/rspack.config.js

However, I agree that having separate docs for Rspack would be great 🐱

Thank you for the example config! I’ll test it out in my project.

Looking forward to dedicated docs, especially with Fluent UI and TypeScript examples for production setups. 😊

chensid avatar Nov 27 '24 08:11 chensid