打包后 vendor警告过大【打包优化】,rollup打包后把所有依赖包统称vendor

:::danger (!) Some chunks are larger than 500 KiB after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: -分块https://rollupjs.org/guide/en/#outputmanualchunks
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. -默认500 :::

优化前

image.png

优化后

image.png