装包 yarn add rollup-plugin-visualizer vite.config.ts 登录后复制 import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { visualizer } from "rollup-plugin-visualizer"; import VueDevTools from 'vite-plugin-vue-devtools' // https://vitejs.dev/config/ export default defineConfig({ server: { port: 3003 }, plugins: [ vue(), //VueDevTools(), visualizer(), ], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } } }) 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23. 编译 yarn build 原创作者: xutongbao 转载于: https://blog.51cto.com/xutongbao/11315115