Babel Plugin#
We provide a Babel plugin for antd-style to enhance the development experience.
pnpm i -D babel-plugin-antd-style
Configuration#
.babelrc configuration:
{
"plugins": ["antd-style"]
}
umi/dumi configuration:
export default defineConfig({
extraBabelPlugins: [require.resolve('babel-plugin-antd-style')],
});
Features#
Support for className resolution#
After installing the Babel plugin, className will be resolved to the corresponding style file directory, effective only in development.
![]()