Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Frontend
/
Frontend
Why are ES modules generally easier to tree-shake than CommonJS modules?
from Frontend
intermediate
1 min
Why are ES modules generally easier to tree-shake than CommonJS modules?
Static `import` and `export` declarations let tools analyze bindings before execution.
ES modules guarantee that every imported file is free of side effects.
CommonJS always downloads modules from the network at runtime.
Check
Ask AI about this kata
Report an error
previous kata
A page jumps when product images load. Which narrow fix most directly improves the releva…
Quiz
next kata
Name the Vite object used by application code to read exposed environment variables
Fill in
A new version is available
Reload