Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

ow to Installing and configuring Grunt

  1. Install node.js to any location on your machine.
  2. Install Grunt CLI tool globally. To do this, run the following command in a command prompt:

    npm install -g grunt-cli
    
  3. Rename 'Gruntfile.js.sample' to 'Gruntfile.js' And 'package.json.sample' to 'package.json'

  4. Install (or refresh) the node.js project dependency, including Grunt, for your Magento instance. To do this, run the following commands in a command prompt: cd your_Magento_directory_name

    npm install
    npm update
    
  5. Then use Grunt commands

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