看官方的解决方案:
1、在rollup配置文件中添加output.manualChunks,将模块拆分成多个chunk,减小每个chunk的大小;
2、build.chunkSizeWarningLimit,提高报错的阈值;
3、使用动态import()进行代码分割,减小每个chunk的大小。
我的解决方案,直接在vite.config.js配置build即可:
TRANSLATE with x English TRANSLATE with COPY THE URL BELOW Back EMBED THE SNIPPET BELOW IN YOUR SITE Enable collaborative features and customize widget: Bing Webmaster Portal Back 标签:Consider,chunk,after,报错,location,document,vite,build From: https://www.cnblogs.com/Blod/p/17011482.html