README
vite-css-plugin
Install
npm install -D vite-css-plugin
# or
yarn add -D vite-css-plugin
Usage
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import css from 'vite-css-plugin';
export default defineConfig({
plugins: [vue(), css({
name: 'ant-design-vue',
tranfrom(component) {
let name = component;
if (/Row|Col/.test(component)) name = 'grid';
return `lib/${name.toLowerCase()}/style/index.css`;
}
})]
})
input
import { Button } from 'ant-design-vue';
output
import 'ant-design-vue/lib/button/style/index.css';
import { Button } from 'ant-design-vue';