Vue project two html files, now both pages use the same vendor.js, this JS file is too large, how to introduce their own module package for each page?

because both html files refer to the same vendor.js, this js file packages the common modules of the two pages together, which is relatively large. Now one of the pages uses fewer modules, so can each page reference its own vendor.js, so that the volume will not be too large? I don"t know how to configure webpack. Thank you very much!

Jun.02,2021

vendor.js is important because your dependent libraries are packaged into vendor. You can use webpack's externals to introduce dependent libraries in the form of cdn. Reduce the volume of vendor. Specific configuration can be Baidu. It is relatively simple


you can use routing laziness to load

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-1e488f5-44ce1.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-1e488f5-44ce1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?