Magento 2 Grunt – Grunt Watch Not Pre-processing LESS for Main Locale

gruntless-cssmagento2

My core_config_data table has general/locale/code set to en_IE. When I run grunt exec:<theme-name> and then grunt less:<theme-name>, CSS is generated in two separate locale folders, en_GB and en_IE. Both have the correct output CSS.

However, when I run grunt watch and then change a LESS file, the change is registered and the page refreshes, but the change doesn't take effect in the browser. I can see that this is because the CSS is only updated in one locale (en_GB) and not the other (primary, en_IE).

Is there a way to tell grunt watch to refresh CSS for all locales at the same time?

Best Answer

I found the answer. I had added my theme to the dev/tools/grunt/configs/themes.js file, but had specified en_GB instead of en_IE.

To put it another way, the locale inside dev/tools/grunt/configs/themes.js didn't match that set in the core_config_data table.

Related Topic