Home > Article > Web Front-end > What does javascript packaging mean?
Javascript packaging means that all .js files and css files are compressed and merged into an All in One .js and .css file, so that the browser can obtain what it needs through a small number of HTTP requests of front-end resources, saving traffic and speeding up page loading.
If we talk about packaging in a narrow sense, it means compressing and merging all js files and css files into an All in One .js and .css file. , so that the browser can obtain the required front-end resources through a small number of HTTP requests, saving traffic and speeding up page loading.
As for packaging in a broad sense, my understanding should be preprocessing during online release Let's work, mainly:
Preprocessing of
TypeScript, LESS, etc.
Merge and compress resources, JavaScript may also need to be modularized, and CSS files may also need to be merged and compatibility prefixed ( -webkit-, -moz-) and other
#js confusion.
As for packaging tools, the popular ones include Gulp, Grunt, Webpack and other toolsRecommended tutorial:《
JS tutorial###》###The above is the detailed content of What does javascript packaging mean?. For more information, please follow other related articles on the PHP Chinese website!