Skip to content

Commit

Permalink
Auto commit: 2024-09-15 14:00:27
Browse files Browse the repository at this point in the history
  • Loading branch information
samlau7245 committed Sep 15, 2024
1 parent 6dc34f1 commit 3441a70
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions blog/2024-09-14-umi-dev.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@

# AntDesign

[1](https://www.jianshu.com/p/83703a6a0865)
[1](https://www.jianshu.com/p/83703a6a0865)
[升级到UMI4的适配方案](https://juejin.cn/post/7273803674789527591)

## 升级到 Umi 4

```
Mako https://makojs.dev is a new fast Rust based bundler from us, which is heavily optimized for umi and much faster than webpack. Visit https://makojs.dev/docs/getting-started#bundle-with-umi for more details if you want to give it a try.
[你知道吗?] 如果你有 MPA(多页应用)需求,可尝试新出的 mpa 配置项,详见 https://umijs.org/docs/guides/mpa
Mako https://makojs.dev is a new fast Rust based bundler from us, which is heavily optimized for umi and much faster than webpack. Visit https://makojs.dev/docs/getting-started#bundle-with-umi for more details if you want to give it a try.
{
"devDependencies": {
+ "@umijs/max": "^4.0.0",
Expand All @@ -22,12 +29,6 @@

```
一个依赖被重复打包显然会造成打包产物的冗余,其实理想情况中,我们希望这些依赖只被打包一次,放到一个公共的文件中,需要使用它的页面都去引用这个文件就好了。
 为了实现这种理想情况,我们需要配置中webpack中的optimization.splitChunks,umi中修改webpack配置需要通过chainWebpack,具体配置如下:
作者:LiXiang
链接:https://juejin.cn/post/7339210740454785059
来源:稀土掘金
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
```

## 命令行
Expand Down

0 comments on commit 3441a70

Please sign in to comment.