Who Gave JavaScript a Build Step?!?
Blog post from Nx
JavaScript's evolution from a simple language that could be sent directly to browsers to one that often requires a build step is explored through the lens of bundling and code-splitting. The conversation with Zack Jackson, a maintainer of prominent bundlers like Webpack and Rspack, delves into how JavaScript development now involves an "input format" that is human-readable and "output format" optimized for efficiency, minimizing network requests and file size. This transformation involves bundling, which aggregates all JavaScript files into a single entity, and code-splitting, which divides this entity into smaller, dynamically loadable pieces to improve performance. Additionally, the role of bundlers in handling non-JS assets, transpilation, and "last mile" optimizations like minification and tree shaking are highlighted. The text also touches on the complexities of module formats like ESM and CommonJS, as well as the differing priorities when building for non-front-end applications, providing a comprehensive look at the intricacies of modern JavaScript development.