AMD, CMD, webpack understanding

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.