styled-components is a popular CSS-in-JS implementation library, which uses the new JavaScript feature Tagged template to write component CSS styles.
Rsbuild provides compile-time support for styled-components, improve the debugging experience and add server-side rendering support to styled-components.
{ displayName:true,// `isSSR` is true in SSR build ssr: isSSR,// `pure` is enabled in production to reduce bundle size pure: isProd, transpileTemplateLiterals:true,}
Example:
When the value is an Object, use the Object.assign function to merge with the default config.