Question 4 of 10Pro Only
What is tree shaking, how does it work, and what conditions must be met for it to be effective?
Sample answer preview
Tree shaking is an optimization technique that eliminates dead code, meaning code that is imported but never used, from the final bundle. The term comes from the idea of shaking a tree to make dead leaves fall. How it works. First, static analysis.
tree shakingES modulesdead codesideEffectsnamed importsbundle analyzer