Interview Hub
Sign in

Q26: What is tree-shaking?

MidJavaScript 29

Answer

Bundler elimination of unused ESM exports for smaller bundles. Requires static import/export; CommonJS is harder to tree-shake. Dead code elimination pairs with minifiers.

Having a tech or coding interview? Check 29 JavaScript & Node.js interview questions.

EditorJavaScript · local only