优化全局样式和 element ui框架,修改nacos-federation,增加打包依赖分析等

This commit is contained in:
编码猿
2025-09-26 01:50:49 +08:00
parent 537c7ca60e
commit 174af7efc3
43 changed files with 15055 additions and 377212 deletions

View File

@@ -4,6 +4,7 @@ import { defineConfig, loadEnv } from 'vite'
import vueJsx from '@vue3-oop/plugin-vue-jsx'
import federation from '@originjs/vite-plugin-federation';
import { nacosRegVitePlugin } from "nacos-federation";
import { visualizer } from 'rollup-plugin-visualizer';
export default defineConfig(async ({ mode }) => {
const env = loadEnv(mode, process.cwd());
@@ -18,7 +19,7 @@ export default defineConfig(async ({ mode }) => {
return {
server: {
port: Number(env.VITE_SERVER_PORT),
host: '0.0.0.0',
host: '::',
strictPort: true,
},
plugins: [
@@ -45,6 +46,13 @@ export default defineConfig(async ({ mode }) => {
'vue-router': { requiredVersion: '^4.0.6' },
pinia: { requiredVersion: '^3.0.3' }
}
}),
visualizer({
title: "主应用依赖分析",
filename: 'dist/stats.html', // 分析文件输出路径
open: false, // 构建完成后自动打开
gzipSize: true, // 显示gzip后的大小
brotliSize: true, // 显示brotli后的大小
})
],
build: {