Vben
2021-03-10 9aa1be821be13168026e0a22878b12297349bbd1
提交 | 用户 | age
07c18d 1 /**
V 2  *  Introduces component library styles on demand.
3  * https://github.com/anncwb/vite-plugin-style-import
4  */
5
c2f654 6 import styleImport from 'vite-plugin-style-import';
V 7
9aa1be 8 export function configStyleImportPlugin() {
V 9   // if (!isBuild) return [];
c2f654 10   const pwaPlugin = styleImport({
V 11     libs: [
12       {
13         libraryName: 'ant-design-vue',
6392b7 14         esModule: true,
c2f654 15         resolveStyle: (name) => {
b107b5 16           return `ant-design-vue/es/${name}/style/index`;
c2f654 17         },
V 18       },
19     ],
20   });
21   return pwaPlugin;
22 }