Home  >  Article  >  Web Front-end  >  What does javascript packaging mean?

What does javascript packaging mean?

hzc
hzcOriginal
2020-06-29 16:29:204276browse

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.

What does javascript packaging mean?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:NaN in JavaScriptNext article:NaN in JavaScript