Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

谈谈你对模块化的理解 #29

Open
yihan12 opened this issue Jan 4, 2024 · 1 comment
Open

谈谈你对模块化的理解 #29

yihan12 opened this issue Jan 4, 2024 · 1 comment

Comments

@yihan12
Copy link
Owner

yihan12 commented Jan 4, 2024

模块化解决了代码污染的问题。提高了代码的重复率以及让多人合作编程了可能。

模块化分为

  1. AMD: require.js 为代表,依赖前置,一律先加载再使用。
  2. CMD: sea.js 为代表,依赖就近原则。
  3. UMD: 同时支持 AMD 和 CMD 方法。
  4. ES6 import/export
@yihan12
Copy link
Owner Author

yihan12 commented Jan 4, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant