vbenjs / vue-vben-admin

A modern vue admin. It is based on Vue3, vite and TypeScript. It's fast!
https://vben.vvbin.cn/
MIT License
22.88k stars 6.24k forks source link

Question: Why were the timestamp and hash removed in application.ts #3905

Closed doraemonxxx closed 2 weeks ago

doraemonxxx commented 4 weeks ago

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

Question

https://github.com/vbenjs/vue-vben-admin/commit/dcbe5510d42c3dc5e93b68704a5fa24c88d4de69

Update docker packaging logic: The original fixed entry is to facilitate the replacement of environment variables, and in the nginx configuration, each time you get js and other resources, you don't need to use the cache. The problem is that the first opening will be very slow. Therefore, the solution used this time is to return to the original hash+timestamp entry file name of vben, but use fuzzy matching when replacing environment variables.

Why were the timestamp and hash removed in https://github.com/vbenjs/vue-vben-admin/commit/a6086f4cc8f33fea7431f3d39eb73dda20c325bd?

The commit message in the revision https://github.com/vbenjs/vue-vben-admin/commit/dcbe5510d42c3dc5e93b68704a5fa24c88d4de69 mentions that keeping the timestamp and hash would enhance the app's loading speed during the initial opening or load.

likui628 commented 4 weeks ago

没有时间戳没问题的,但是不保留hash值就不对了 应该是这样的entryFileNames: assets/entry/[name]-[hash].js

doraemonxxx commented 4 weeks ago

I don't fully understand. If the old revision was merged (which means it impacts drastically), it would make sense for the PR to be accepted. But why was the current revision merged? There's no benchmark to show it's faster or better, correct? Thank you.

*Translation" 我不完全明白。如果旧版本被合并(这意味着它会产生巨大影响),那么 PR 被接受就有意义了。但为什么当前的修订版要合并呢?没有基准可以表明它更快或更好,对吗?谢谢。