Performance optimization vue2/vue3 reduces project startup time through CDN

In fact, you can compress the file size of images and other files to make the project run faster
and try to use asynchronous or lazy loading
You can use CDN Avoid using npm to import Vue dependencies in the project, thereby reducing the loading time when the project starts
The usage method is as follows

<!-- Vue 2 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>

<!-- Vue 3 -->
<script src="https://cdn.jsdelivr.net/npm/vue@3"></script>

For example, vue2 project
We can find index.html under public in the root directory
plus
Insert image description here
vue3 also finds the project and adds to the page index.html

It’s just a version difference
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_45966674/article/details/134956814