styleImport.ts 361 B

12345678910111213141516
  1. import styleImport from 'vite-plugin-style-import';
  2. export function configStyleImportPlugin() {
  3. const pwaPlugin = styleImport({
  4. libs: [
  5. {
  6. libraryName: 'ant-design-vue',
  7. esModule: true,
  8. resolveStyle: (name) => {
  9. return `ant-design-vue/es/${name}/style/index`;
  10. },
  11. },
  12. ],
  13. });
  14. return pwaPlugin;
  15. }