I'm writing a custom module and i need to add styles. So i'm trying to follow magento's way with using _module.less file. i've created a file Namespace/Module/view/frontend/web/css/source/_module.less. When i change this file, i see, that grunt watch see those changes and recompiles my styles. But changes from my _module.less file never gets into result files. Any help?

2 Answers 2


I think, i've found an answer. I worked on the admin part of a module before. So it somehow generated a code without frontend part. So what i did to get it work:

  • Disable module with clear content: php bin/magento module:disable Namespace_Module --clear-static-content
  • Clear cache php bin/magento cache:clean
  • Enable module back with clear content php bin/magento module:enable Namespace_Module --clear-static-content
  • This worked for me! Accept this answer (:
    – MackieeE
    Commented May 30, 2023 at 12:04

Run below commands

- php bin/magento cache:clean
- php bin/magento setup:static-content:deploy
  • 2
    Allready tried. More than that: i'm in developer mode - so, as i know, i don't need do deploy static content
    – Styopchik
    Commented Aug 31, 2016 at 7:05

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.