diff --git a/packages/core/src/plugins/index.ts b/packages/core/src/plugins/index.ts index e641719bf..7f4779cf9 100644 --- a/packages/core/src/plugins/index.ts +++ b/packages/core/src/plugins/index.ts @@ -830,9 +830,26 @@ export const overrideFileContents = ( )}. FIXING...DONE` ); } else if (overrideExists) { - logInfo( - `${chalk().gray(dest)} overridden by: ${chalk().gray(overridePath.split('node_modules').pop())}` - ); + if (originalExists) { + if (fk.includes(override[fk])) { + fileToFix = fileToFix.replace(originalRegEx, `${override[fk]}`); + logSuccess( + `${chalk().bold.white(dest)} requires override by: ${chalk().bold.white( + overridePath.split('node_modules').pop() + )}. FIXING...DONE` + ); + } else { + logInfo( + `${chalk().gray(dest)} overridden by: ${chalk().gray( + overridePath.split('node_modules').pop() + )}` + ); + } + } else { + logInfo( + `${chalk().gray(dest)} overridden by: ${chalk().gray(overridePath.split('node_modules').pop())}` + ); + } } else { failTerms.push(fk); }