As the average web page grows, you’ll likely include jQuery (yes, it’s still popular in 2020), a couple of fonts, a few plugins, as well as various style sheets and some JavaScript of your own. One of the reasons for doing this is to minimize the number of HTTP requests you make to the server. In this article, I’m going to show you how to install and configure webpack, then use it to create minified bundles for a simple static site with a handful of assets. Webpack is primarily a bundler, and as such you can also use it to bundle just about any resource or asset you care to think of. However, you don’t need to be using a front-end framework, or be working on a large-scale project to take advantage of it. It has over 55,000 stars on GitHub and is used by many of the big players in the JavaScript world, such as React and Angular. ![]() ![]() Webpack has established itself as an indispensable part of the JavaScript toolchain.
0 Comments
Leave a Reply. |