Magento – After deleting files under ‘view_preprocessed’ folder they dont appear again when reloading site

csslessmagento2theme

I'm testing some small LESS changes in my theme. After every change I delete the contents inside:

pub/static/frontend/mytheme

and

var/view_preprocessed

Then I reload my site and the contents of var/view_processed (css and source folders) are not created so the new LESS changes aren't applied. However the site loads fine with the previous LESS settings.

After visiting 10-15 pages the css and source folders are created again and I can see my changes finally.

I constantly delete the Magento cache so thats not the issue. I've also set Firefox and Chrome to not save cookies, history, etc. Permissions have been set to 777 to discard that possible cause.

Why dont the contents of var/view_preprocessed folder get created right after the first reloading of my site?

Best Answer

You can't get view_processed folder until you deploy the content in site.

You must use deployment command to regenarate the view_processed folder.

php bin/magento setup:static-content:deploy

Now you can check inside var folder.

Now view_processed folder is appear.

Related Topic