Question

I'm doing some theme development, which I am somewhat new to. I am making changes to some files, and I like to test if they can compile correctly, so I run the setup:static-content:deploy somewhat regularly.

Prior to doing so, I purposely wipe the pub/static folder as well as var/page_cache & view_preprocessed folders respectively. The one thing that I do not know, if static-content is ever deployed into the generation/di folders ?

So if I'm doing compilation testing for .less file changes, do I need at all to wipe di & generation folder and re-run setup:di:compile ?

Just curious.

Was it helpful?

Solution

´generated' is used for generated code, like factories and interceptors. ´di´ is used to store information regarding dependency injection.

As such, those 2 folders don't affect rendering less files. ´view_preprocessed´ stores concatenated less files, so you well have to delete this one, and ´cache´ and ´page_cache´ affect rendered html, so you only need to flush those if the html is changed or you added a new stylesheet / JavaScript.

However, you're better of setting Magento to developer mode since this will create symbolic links in the ´pub´-folder, minimizing the need for deploying static content.

OTHER TIPS

From my understanding, those folders (DI and generation) do not contain any frontend assets. As such, I don't think it would be necessary.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top