The content of this article is about the code analysis of closure performance optimization in js. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
I built a vue tp5.1 backend project before, and it had many pitfalls. One of them was the resource loading solution. Since it was a backend project, I didn’t take it to heart before. After seeing some resource optimization solutions, I feel the need to do it.
1 |
|
You can see that the maximum file size is 820kb, even after Gzipped compression it is 219kb, with As the project continues to grow, this value will continue to increase
Only configuration modifications for vue-cli@3.0 will be made here
index.html file
1 2 3 4 5 6 7 8 9 10 11 12 |
|
index-prod.html file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
vue.config.js file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
Related recommendations:
How does vue optimize the first screen loading time
How does Vue use CDN to optimize the first screen loading
The above is the detailed content of How vue-cli3.0 optimizes resource loading. For more information, please follow other related articles on the PHP Chinese website!