1

When running the composer install command the www/dev/tools/grunt/configs/themes.js file is being overwritten and removing the config for my custom theme. When searching online I came across the following GitHub issue:

https://github.com/magento/magento2/issues/7196

See below the changes I tried based on the issue above:

  1. Copy www/dev/tools/grunt/configs/themes.js to www/dev/tools/grunt/configs/local-themes.js and specify the custom theme as so:

module.exports = { custom_theme: { area: 'frontend', name: 'Custom/theme', locale: 'en_GB', files: [ 'css/styles-m', 'css/styles-l', 'css/petlandia', 'css/email', 'css/email-inline' ], dsl: 'less' }, }

  1. Rename grunt-config.json.sample -> grunt-config.json.

This method so far hasn't worked and the custom theme can not be found when running grunt exec:custom_theme. Is there anyway I can extend the themes.js file so that when running composer install or composer update my custom theme config is not removed?

1 Answer 1

0

Make sure you have the latest Gruntfile.js.sample and grunt-config.js.sample from the repo and run

cp Gruntfile.js{.sample,}
cp grunt-config.js{.sample,}

That takes care of actually loading your renamed themes configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.