Bundlers package together many files to create production builds of websites. Answer the following about optimizations they perform to reduce how much code must be sent over the wire, for 10 points each.
[10h] This kind of dead-code elimination, which is most effective on ECMAScript modules, removes whole files or functions from dependencies when it can be statically determined that they’re unused in a bundle.
ANSWER: tree-shaking [accept word forms]
[10m] Modern bundlers concatenate modules into fewer scopes when possible in an optimization named for this term applied to “scope.” In a related optimization known by this term, JavaScript moves declarations of variables to the tops of their enclosing scopes.
ANSWER: hoisting [accept word forms]
[10e] Scope hoisting often leads to performance improvements since it performs this optimization on imported modules. This general compiler optimization replaces a function call with the code inside the function.
ANSWER: function inlining [accept word forms; or inline expansion]
<Alistair Gray, Other Science - Computer Science>