es6-modules Flashcards

1
Q

How are ES Modules different from CommonJS modules?

A

different syntax - use import and export; syntax is even more compact than CommonJS’s, structure can be statically analyzed, support for cyclic dependencies is better than CommonJS’s, direct support for asynchronous loading

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, Webassembly modules, Asset modules

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