Object | Function
tools.styledComponents
config is corresponding to babel-plugin-styled-components, or @swc/plugin-styled-components when using SWC plugin.
When the value is an Object, use the Object.assign function to merge with the default config. For example:
When the config is a Function, the first parameter is the default configuration, and the second parameter provides some utility functions that can be called directly:
The feature is enabled by default, and you can configure tools.styledComponents
to false
to disable this behavior, which can improve build performance: