Which commands should I run after adding new CSS in Magento 2 ?
Solved! Go to Solution.
Hi @foysal
Yes - when you change anything in CSS and JS file then you required to run this commands !
For second question i would suggest you to refer this link - https://magento.stackexchange.com/questions/217131/load-custom-css-after-style-l-css-for-home-page
It might helps you for the same !
Hope it helps
Hi @foysal
You will required to run below commands in a sequence :
php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:clean php bin/magento cache:flush
Hope it helps !
@Manthan DaveShould I run all these commands after every change ?
How to load a stylesheet at the end of all stylesheet ?
Hi @foysal
Yes - when you change anything in CSS and JS file then you required to run this commands !
For second question i would suggest you to refer this link - https://magento.stackexchange.com/questions/217131/load-custom-css-after-style-l-css-for-home-page
It might helps you for the same !
Hope it helps
@Manthan Dave, What are the benefits of using `developer` mode ?
Hi @foysal
Main benefits of developer mode is - you can able to see ERRORS on the browser.
In Default or production mode - errors is logged in the var/log directory and on the browser you will not able to see those errors.
In developer mode static view file caching is also disabled and automatic code compilation can be done for the same.
For more details refer this link - https://devdocs.magento.com/guides/v2.2/config-guide/bootstrap/magento-modes.html
Hope it helps !
!