This processing can include searching for a not-found file in additional locations, file merging, and file minification.
The static view files deployment command enables you to write static files to the Magento file system when the Magento software is set for production mode.
The term static view file refers to the following:
“Static” means it can be cached for a site (that is, the file is not
dynamically generated). Examples include images and CSS generated from
“View” refers to presentation layer (from MVC). Static view files are
located in the /pub/static directory, and
some are cached in the /var/view_preprocessed directory as well.
Static view files deployment is affected by Magento modes as follows:
The default and developer mode: Magento generates them on demand, but the rest are cached in a file for speed of access.
The production mode: Static files are not generated or cached.
You must write static view files to the Magento file system manually using the command discussed in this topic; after that, you can restrict permissions to limit your vulnerabilities and to prevent accidental or malicious overwriting of files.
Developer mode only: When you install or enable a new module, it might
static files, you must clean the old files to make sure you get all
the changes for the new module.