mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-24 20:30:18 +08:00
a7c8c67c83
* fix: 变量名错误 * fix: 修复正则可以匹配纯数字问题
23 lines
534 B
TypeScript
23 lines
534 B
TypeScript
/**
|
|
* Introduces component library styles on demand.
|
|
* https://github.com/anncwb/vite-plugin-style-import
|
|
*/
|
|
|
|
import styleImport from 'vite-plugin-style-import';
|
|
|
|
export function configStyleImportPlugin(isBuild: boolean) {
|
|
if (!isBuild) return [];
|
|
const styleImportPlugin = styleImport({
|
|
libs: [
|
|
{
|
|
libraryName: 'ant-design-vue',
|
|
esModule: true,
|
|
resolveStyle: (name) => {
|
|
return `ant-design-vue/es/${name}/style/index`;
|
|
},
|
|
},
|
|
],
|
|
});
|
|
return styleImportPlugin;
|
|
}
|