gf-vben-admin/build/vite/plugin/styleImport.ts

17 lines
361 B
TypeScript
Raw Normal View History

2021-01-18 22:42:35 +08:00
import styleImport from 'vite-plugin-style-import';
2021-02-03 23:52:55 +08:00
export function configStyleImportPlugin() {
2021-01-18 22:42:35 +08:00
const pwaPlugin = styleImport({
libs: [
{
libraryName: 'ant-design-vue',
2021-01-18 23:37:36 +08:00
esModule: true,
2021-01-18 22:42:35 +08:00
resolveStyle: (name) => {
2021-01-27 21:15:38 +08:00
return `ant-design-vue/es/${name}/style/index`;
2021-01-18 22:42:35 +08:00
},
},
],
});
return pwaPlugin;
}