mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-25 02:58:43 +08:00
22 lines
475 B
TypeScript
22 lines
475 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() {
|
|
const pwaPlugin = styleImport({
|
|
libs: [
|
|
{
|
|
libraryName: 'ant-design-vue',
|
|
esModule: true,
|
|
resolveStyle: (name) => {
|
|
return `ant-design-vue/es/${name}/style/index`;
|
|
},
|
|
},
|
|
],
|
|
});
|
|
return pwaPlugin;
|
|
}
|