Skip to content

Commit

Permalink
Auto commit: 2024-09-22 12:05:44
Browse files Browse the repository at this point in the history
  • Loading branch information
samlau7245 committed Sep 22, 2024
1 parent 39b2082 commit 831d5c0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions blog/2024-09-14-umi-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,15 @@ COMPRESS=none umi build 可以关闭项目构建时的代码压缩功能, 方便
# 可以分析产物的源码构成。
# highlight-next-line
ANALYZE=1 max build
```




```
通过调整optimization设置,如启用minimize、配置splitChunks选项,以及通过cacheGroups优化vendor和default chunks的方式来减少打包时间。
通过ContextReplacementPlugin过滤掉不必要的moment国际化文件,进一步减少打包时间。
使用Vite集成到Umi项目中。Vite提供了一个更快的服务器和更优的构建速度,这对于减少启动时的Bundling时间非常有帮助。通过配置vite.config.ts,可以解决使用@与@@别名时模块找不到的问题,以及处理CommonJS模块转ES Module时可能遇到的错误‌2。
```

0 comments on commit 831d5c0

Please sign in to comment.