mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 16:46:19 +08:00
refactor(tree): Refactor tree to support antv3.0
This commit is contained in:
@@ -9,17 +9,17 @@ import type { Plugin } from 'vite';
|
||||
export function configHmrPlugin(): Plugin {
|
||||
return {
|
||||
name: 'singleHMR',
|
||||
handleHotUpdate({ modules, file }) {
|
||||
if (file.match(/xml$/)) return [];
|
||||
// handleHotUpdate({ modules, file }) {
|
||||
// if (file.match(/xml$/)) return [];
|
||||
|
||||
modules.forEach((m) => {
|
||||
if (!m.url.match(/\.(css|less)/)) {
|
||||
m.importedModules = new Set();
|
||||
m.importers = new Set();
|
||||
}
|
||||
});
|
||||
// modules.forEach((m) => {
|
||||
// if (!m.url.match(/\.(css|less)/)) {
|
||||
// m.importedModules = new Set();
|
||||
// m.importers = new Set();
|
||||
// }
|
||||
// });
|
||||
|
||||
return modules;
|
||||
},
|
||||
// return modules;
|
||||
// },
|
||||
};
|
||||
}
|
||||
|
@@ -4,10 +4,10 @@
|
||||
*/
|
||||
import styleImport from 'vite-plugin-style-import';
|
||||
|
||||
export function configStyleImportPlugin(isBuild: boolean) {
|
||||
if (!isBuild) {
|
||||
return [];
|
||||
}
|
||||
export function configStyleImportPlugin(_isBuild: boolean) {
|
||||
// if (!isBuild) {
|
||||
// return [];
|
||||
// }
|
||||
const styleImportPlugin = styleImport({
|
||||
libs: [
|
||||
{
|
||||
@@ -19,6 +19,7 @@ export function configStyleImportPlugin(isBuild: boolean) {
|
||||
'anchor-link',
|
||||
'sub-menu',
|
||||
'menu-item',
|
||||
'menu-divider',
|
||||
'menu-item-group',
|
||||
'breadcrumb-item',
|
||||
'breadcrumb-separator',
|
||||
|
Reference in New Issue
Block a user