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

模块化 模块化规范 #89

Open
Lawguancong opened this issue Sep 28, 2021 · 0 comments
Open

模块化 模块化规范 #89

Lawguancong opened this issue Sep 28, 2021 · 0 comments

Comments

@Lawguancong
Copy link
Owner

Lawguancong commented Sep 28, 2021

介绍模块化发展历程

Advanced-Frontend/Daily-Interview-Question#28

动态编译 & 静态编译 / 动态加载 & 静态加载 / 静态分析?

ESM

es6

AMD

CMD

requirejs

seajs

总结

  • commonjs -> nodejs 同步加载 运行时加载 动态加载 浅拷贝
  • es6 -> 异步加载 编译时加载 静态加载 tree-shaking 值引用
  • AMD -> requirejs 异步加载 前置依赖
  • CMD -> seajs 异步加载 按需依赖

参考链接

http://huangxuan.me/js-module-7day/#/
https://es6.ruanyifeng.com/#docs/module-loader
https://juejin.cn/post/6844903576309858318
https://juejin.cn/post/6844904051084099598

@Lawguancong Lawguancong changed the title 模块化 模块化 模块化规范 Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant