perf: optimize local startup speed and add header Class configuration to drawer (#4840)

This commit is contained in:
Vben
2024-11-09 11:12:30 +08:00
committed by GitHub
parent da7d61b160
commit 9cf0573921
7 changed files with 321 additions and 312 deletions

View File

@@ -6,6 +6,7 @@ import path, { relative } from 'node:path';
import { findMonorepoRoot } from '@vben/node-utils';
import { NodePackageImporter } from 'sass';
import { defineConfig, loadEnv, mergeConfig } from 'vite';
import { defaultImportmapOptions, getDefaultPwaOptions } from '../options';
@@ -85,7 +86,7 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
clientFiles: [
'./index.html',
'./src/bootstrap.ts',
'./src/{views,layouts,router,store,api}/*',
'./src/{views,layouts,router,store,api,adapter}/*',
],
},
},
@@ -113,7 +114,8 @@ function createCssOptions(injectGlobalScss = true) {
}
return content;
},
api: 'modern-compiler',
api: 'modern',
importers: [new NodePackageImporter()],
},
}
: {},

View File

@@ -4,35 +4,6 @@ import { lazyImport, VxeResolver } from 'vite-plugin-lazy-import';
async function viteVxeTableImportsPlugin(): Promise<PluginOption> {
return [
// {
// config() {
// return {
// optimizeDeps: {
// include: [
// 'vxe-pc-ui/es/vxe-button/index.js',
// 'vxe-pc-ui/es/vxe-checkbox/index.js',
// 'vxe-pc-ui/es/vxe-icon/index.js',
// 'vxe-pc-ui/es/vxe-input/index.js',
// 'vxe-pc-ui/es/vxe-loading/index.js',
// 'vxe-pc-ui/es/vxe-modal/index.js',
// 'vxe-pc-ui/es/vxe-pager/index.js',
// 'vxe-pc-ui/es/vxe-radio-group/index.js',
// 'vxe-pc-ui/es/vxe-select/index.js',
// 'vxe-pc-ui/es/vxe-tooltip/index.js',
// 'vxe-pc-ui/es/vxe-ui/index.js',
// 'vxe-pc-ui/es/vxe-upload/index.js',
// 'vxe-table/es/vxe-colgroup/index.js',
// 'vxe-table/es/vxe-column/index.js',
// 'vxe-table/es/vxe-grid/index.js',
// 'vxe-table/es/vxe-table/index.js',
// 'vxe-table/es/vxe-toolbar/index.js',
// 'vxe-table/es/vxe-ui/index.js',
// ],
// },
// };
// },
// name: 'vxe-table-adapter',
// },
lazyImport({
resolvers: [
VxeResolver({