The front-end vue project package file is too large, how should it be optimized?

after the vue project is packaged, there are many large files, which quote a third-party plug-in, but the server is in Beijing, but the server is used in Shenzhen, and it takes a few seconds to open each time. How should this be optimized? Details are as follows:
packaged file:

downLoad Content:


apart from network optimization, you can only check whether large files are necessary one by one, and is there any other alternative?


1. I don't know which plug-ins you use. If things like jQuery, echarts, elementUI, axios, etc., all have cdn links, use cdn to reference them in index.html, and then configure these plug-ins in webpack not to package them. This will save a lot of
2. The code commonly used in company projects can also be configured on cdn, which not only reduces the amount of code for subsequent development, but also reduces the burden of packaging and loading
3. In addition, when compressing, you need to cooperate with the front and rear ends to enable gzip, to further compress the packaged files

.

do not know your specific quotation, may not be in place, welcome to communicate ~


Library: it's better to have a chunk alone or use cdn


cdn to find a place where you can download vue2-brace-editor', and put it in your static resources, such as Qiniuyun

.
Menu