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
    Commented Sep 15, 2020 at 9:15
  • yes i want to directly see my changes not always want to run command@BenCrook
    – Prits
    Commented 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.@Ben
    – Prits
    Commented Sep 15, 2020 at 10:17
  • 1
    Yeah, 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
    Commented Sep 15, 2020 at 10:46
  • Thanks for the response it really helps.
    – Prits
    Commented 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
    Commented Sep 15, 2020 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.