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:
- 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'
},
}
- 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?