es6-modules Flashcards

1
Q

How are ES Modules different from CommonJS modules?

A
  1. ES Modules are more compact than CommonJS modules
  2. The structure of ES Modules can be statically analyzed (for static checking, optimization, etc.)
  3. Their support for cyclic dependencies is better than CommonJS’s
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What kind of modules can Webpack support?

A

ECMAScript modules, CommonJS modules, AMD modules, Assets, and WebAssembly modules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly