Search code examples
javascriptbundling-and-minification

What is an asset and what is a bundle


I am new to JavaScript and its related framework.

What is an asset? Is it a group of JS/HTML/img files? Is it a folder? Or a library? Or a generic term used to describe all UI related files?

What is a bundle?


Solution

  • An asset is typically a static file such as JS files, image files, CSS files. A bundle is when those files are then compressed together into a single file.

    For example, if you create a "bundle" you can say: Take layout.js, product.js, print.js and output to my_bundle_name.js. Usually making a single concatenated minified file called bundle.