Prep dev environment for theming
The first thing we must always do, no matter what sort of development we are doing, is to make sure developer mode is enabled. To find out what the current deploy mode is set to, we can run:
We can see that we are currently in developer mode. If we were in some other mode, we can set this to developer mode by typing:
bin/magento deploy:mode:set developer
This ensures that Magento’s backend processes are set up optimally for development.
We also need to turn off certain caches that could stop our changes from showing up on the frontend. We can get all of the available cache types by running:
We won’t go into extreme detail about all the caches, but let’s look at the layout, block_html, full_page and translate caches.
These are the caches that typically have the biggest impact on frontend development processes, so we can just disable them during development so we don’t need to worry about anything cache-related.
We can disable these caches from the command line by executing:
bin/magento cache:disable layout block_html full_page translate
Disable Browser Cache
An easy way to disable the browser cache is to open the Dev Tools, and go to the Network tab. Look for the Disable Cache box, and check it: