@wry-smile/vite-plugin-antd-style-import
v1.4.4
Published
vite plugin import antd library style
Downloads
4
Readme
@wry-smile/vite-plugin-antd-style-import
- A vite plugin for import antd library component style automatic
install
npm install @wry-smile/vite-plugin-antd-style-import
Usage
// vite.config.js
import { componentStyleImport, antdResolver, camelCaseToKebabCase, LibraryConfig } from '@wry-smile/vite-plugin-antd-style-import'
export default defineConfig({
plugins: [
componentStyleImport.vite({
libraryConfig: [
// plugin preset
antdResolver()
]
}),
],
})
// In Tsx File
import { Button } from 'antd'
const fn = () => {
return <Button>button</Button>
}