-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 开启 webpack 5 后,打包物理缓存未生效 #6266
Comments
我升级到了最新的3.4.3,仍然有这个问题,能方便给个回复吗 |
怎么判断物理缓存没有生效? |
每次打包的时间均为12s左右,速度上没有提升,并且在 node_modules 的 .cache 中并没有看到缓存文件 |
cache 在 src/.umi/.cache 下。 |
This comment has been minimized.
This comment has been minimized.
* fix: webpack5 build 模式下没有生成物理缓存 see webpack/webpack#12345 (comment) Closes #6266 * Update packages/bundler-webpack/src/index.ts * Update packages/bundler-webpack/src/index.ts Co-authored-by: chencheng (云谦) <sorrycc@gmail.com>
* fix: webpack5 build 模式下没有生成物理缓存 see webpack/webpack#12345 (comment) Closes umijs#6266 * Update packages/bundler-webpack/src/index.ts * Update packages/bundler-webpack/src/index.ts Co-authored-by: chencheng (云谦) <sorrycc@gmail.com>
那在生产环境中其实开启物理缓存并没有什么作用是吧,因为每次部署都不会上传.umi或者.umi-production这个文件夹,也就是每次打包机在构建的时候都不会利用缓存。 |
在生产环境构建机上回一直存在.umi文件夹的,所以会走缓存 |
请问是要把.umi文件提交上去吗 |
What happens?
使用
yarn create @umijs/umi-app
创建空项目并开启 webpack5,然后打包,每次打包时间都是10~12s之间,webpack5 提供的物理缓存看起来并未生效,并且打包过程中依然有 warning。Mini Showcase Repository(REQUIRED)
复现仓库:https://github.com/bluescurry/umi-fresh
How To Reproduce
Steps to reproduce the behavior: 1. 2.
Expected behavior 1. 2.
执行
yarn run build
打包Context
The text was updated successfully, but these errors were encountered: