7/6/2025 Most modern JavaScript bundlers implement an optimization called "scope hoisting". The idea is that rather than wrapping each bundled module in a function, a compiler concatenates the modules into a single scope. Say you have a program like this: // index.js import {add} from './math'; console.log(add(2, 3)); // math.js export function add(a, b) { return a + b; } When scope hoisted, the o