The difference between AMD, CMD, and Webpack:
Once there were two specifications, one was AMD and the other was CMD.
Requirejs is the implementation of the AMD specification, SEAJS is the implementation of the CMD specification,
An assertion of pre-loading dependencies, a claim for deferred load dependency
Then came the COMMONJS specification
Webpack is supporting the COMMONJS specification.
At present, it can be said to dominate the front-end construction pattern.
COMMOMJS is a service-side specification, node is to use this specification, he is synchronous loading, after all, the server does not consider asynchronous.
It is a standardized attempt on a common JavaScript model that contains AMD-defined
AMD is an abbreviation for the asynchronous loading module, which uses require to introduce a module that advocates dependency front.
CMD and AMD are actually very close, but also because of the sea.js, Chinese information is relatively cordial.
And there's the middle of AMD and Commomjs UMD.
Webpack is actually a packaging tool, his idea is that everything is a module, CSS is a module, JS is a module, the picture is a module. It also provides some column module loading (various-loader) to compile the module. The official recommendation is to use the COMMONJS specification, but it also supports CMD and AMD.