What about the asynchronous loading of JS modularization?

such as the title, found a lot of information did not understand, can you give a popular explanation?


CommonJS is a dynamic synchronous import, applied to the server side, and the files are local, even if the main thread is blocked. And because it's still dynamic, you can load the module through require ('${path} / xxx.js') .

and ES Module , that is, import and export module in the way of improt/export , which is asynchronous, because when it is applied to the browser, files need to be downloaded, and synchronous import will have a great impact on rendering.

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