How to prevent from static content deploy after changing in JS or CSS file in Magento 2. After doing some little change changes are not loads in front end if doesn't deploy.
How to do that Any help is appriciated.
-
Are you saying you do not want static content deploy to change any files?Ben Crook– Ben Crook2020年09月15日 09:15:02 +00:00Commented Sep 15, 2020 at 9:15
-
yes i want to directly see my changes not always want to run command@BenCrookPrits– Prits2020年09月15日 10:03:08 +00:00Commented Sep 15, 2020 at 10:03
1 Answer 1
You can use Grunt to compile your CSS which means you do not have to run the static content deploy command. See https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/css-topics/css_debug.html for installation steps.
Once installed you can run grunt watch which will compile your files automatically when you save any changes.
If you don't want to install Grunt another option is to use client-side compilation but it can be quite slow, you can set this by going to STORES > Settings > Configuration > ADVANCED > Developer > Frontend development workflow > Workflow type and setting it to client side.
-
Thanks for your response i have one question is it same for JS File.@BenPrits– Prits2020年09月15日 10:17:19 +00:00Commented Sep 15, 2020 at 10:17
-
1Yeah, Javascript does not need compiling so if you're not seeing JS changes it will likely be your browser and/or Magento cache - both of these can be disabled.Ben Crook– Ben Crook2020年09月15日 10:46:30 +00:00Commented Sep 15, 2020 at 10:46
-
Thanks for the response it really helps.Prits– Prits2020年09月15日 11:24:30 +00:00Commented Sep 15, 2020 at 11:24
-
have any post or module on checkout module which have checkout steps and save data for loggedin and guest users.Prits– Prits2020年09月15日 11:26:49 +00:00Commented Sep 15, 2020 at 11:26
Explore related questions
See similar questions with these tags.