When I delete the pub/static/frontend or backend folder, everything falls on the frontend and backend, and every time I need to call static-content: deploy for everything to work fine. Using developer mode
why can help me ?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Magento 2 generates JS,css and HTML to pub/static in order to make the website more faster and it's like caching.
So each time when you remove and it has to be generated again manually via Command.
php bin/magento setup:static-content:deploy -f
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 LESS. “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:
“Default“ and “developer“ modes: 1.) Magento generates them on demand, but the rest are cached in a file for speed of access.
Production mode: Static files are not generated or cached. You must write static view files to the Magento file system manually using the command.
Hope this helps :)