cancel
Showing results for 
Search instead for 
Did you mean: 

Grunt does not compile my Custom Modules

Grunt does not compile my Custom Modules

Hello everybody,

 

I would like to understand how Grunt compiles sources in Magento 2.

 

I have installed Grunt on my server and set my Magento 2 project (add Gruntfile.js and update dev/tools/grunt/configs/themes.js to add my theme)

I have Less in app/design/frontend/<MyVendor>/<mytheme>/<MyVendor_Module>/web/css/.

 

I tried to run grunt:exec <mytheme> and Grunt compiles all Less in all Magento Modules (in my app/design/...) to pub/static/frontend/<MyVendor>/<mytheme>/<my_Locale>. But Less in my custom modules (in my app/design) is not compiled.

 

Tests :

When I run grunt watch and I modify Less in app/design/frontend/<MyVendor>/<mytheme>/<Magento_Module>/web/css/, it works.

When I run grunt watch and I modify Less in app/design/frontend/<MyVendor>/<mytheme>/<MyVendor_Module>/web/css/, it does not work.

 

Thank you

1 REPLY 1

Re: Grunt does not compile my Custom Modules

Sorry but this room it not about Grunt, nor other Magento 2 core solutions. Try to ask it in "programing questions".
I'm not familiar with it, so at all I can't help you :<