When I change the file, clear cache, remove pub/static/* and var/view_prepocessed/* my changes are nicely shown on the front end but I’m guessing when I update the module all my changes will be overwritten. That is why I should never customize anything in the vendor directory.
I tried to move the _module.less file and modify it there but there are no changes on the front end.
app/design/frontend/my_store/theme/web/css/source
Could you please give me a tip on how to do it correctly?
Thank you.
I believe another way of doing it is to create a module in app/code/ and do something similar. But I don’t think I’ve done it that way before - So, I can’t talk you though it.
I tried 2 ways under /frontend
1.1
frontend/my_store/theme/Amasty_module-name/web/css/sourse/_module.less
1.2
frontend/my_store/theme/Amasty/module-name/web/css/sourse/_module.less
…and one creating a module
2.
app/code/my_store/Amasty_module-name/web/css/sourse/_module.less
Annoying. I believe I will have to live with it and every time I upgrade the module I will have to update the file.