Some people do not recommend using webpack DllPlugin,. What do you think?

What are the disadvantages of

webpack DllPlugin, and why not recommend this plug-in?

Aug.16,2021

there is a major problem
when the application of a single page is large, the load pressure of the module can be dispersed by loading on demand, while the js referenced by dll has to be loaded first regardless of whether it is needed or not. When there are more dll, the page loading speed is slow.
of course, you can only draw out the common ones, but that way you can smoke less.

for large components such as d3 echarts, the packaging speed is significantly improved after typing into dll, but at the expense of page loading speed, we don't need every page, but we have to load this part of js, first. This part of js must be loaded before subsequent pages can be loaded. It seems like a very small time, but the waste of page loading speed of 100 milliseconds has sacrificed the experience. The more third-party components, the more serious the problem.

is also still looking for a solution to load dll on demand through a compromise.


this is sacrifice.


you can try to use import ('echarts') to split the code. Webpack will split a file for you and load it when you use it.


this project is used all the time. The key is what is in the dll file. I usually place the most basic needs in the project, such as vue project, put vue,vue-router . Others are like third-party libraries, such as echarts , why should this be placed in dll . It is possible to extract a single file and load it asynchronously. I think there is nothing good or bad, only look at their own suitable application scenario, look at the scene, look at the scene, look at the scene .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb6398-4fa8a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb6398-4fa8a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?