Alexander Kondov
Sep 5, 2018 · 1 min read

Thank you for the response! The compilation process goes through several stages, yes. This, however is more related to scope, hoisting, right and left hand side references.
When you send over something to the browser even if you don’t run the actual code it will still be parsed and evaluated. In fact you can see the amount of unused JavaScript that you have from the chrome dev tools. Press Cmd + Shift + P then type Coverage and press Enter. Press the refresh button and it will show you all JS files you load and what percentage of it is not used on the page you have just reloaded.
This tool is excellent to see code splitting opportunities and possible optimisations.

    Alexander Kondov

    Written by

    Software Engineer. Blogger.