refactor(common): drop PRELOADED_IMAGES name in production (#59425)

In this commit, we drop the `PRELOADED_IMAGES` injection token name in production.

PR Close #59425
This commit is contained in:
arturovt 2025-01-08 16:14:44 +02:00 committed by Jessica Janiuk
parent 00cc923117
commit dd1d69b2e2

View file

@ -23,7 +23,10 @@ export const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
* This Set tracks the original src passed into the `ngSrc` input not the src after it has been
* run through the specified `IMAGE_LOADER`.
*/
export const PRELOADED_IMAGES = new InjectionToken<Set<string>>('NG_OPTIMIZED_PRELOADED_IMAGES', {
providedIn: 'root',
factory: () => new Set<string>(),
});
export const PRELOADED_IMAGES = new InjectionToken<Set<string>>(
typeof ngDevMode === 'undefined' || ngDevMode ? 'NG_OPTIMIZED_PRELOADED_IMAGES' : '',
{
providedIn: 'root',
factory: () => new Set<string>(),
},
);