Skip to content

Commit

Permalink
fixup! feat(common): add Netlify image loader
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKushnir committed Feb 8, 2024
1 parent 6d60b7c commit d87df45
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -6,11 +6,16 @@
* found in the LICENSE file at https://angular.io/license
*/

import {Provider, ɵRuntimeError as RuntimeError} from '@angular/core';
import {
Provider,
ɵformatRuntimeError as formatRuntimeError,
ɵRuntimeError as RuntimeError,
} from '@angular/core';

import {RuntimeErrorCode} from '../../../errors';
import {isAbsoluteUrl, isValidPath} from '../url';

import {IMAGE_LOADER, ImageLoaderConfig, ImageLoaderInfo} from './image_loader';
import {RuntimeErrorCode} from '../../../errors';
import {formatRuntimeError} from '@angular/core/src/errors';

/**
* Name and URL tester for Netlify.
@@ -21,6 +26,7 @@ export const netlifyLoaderInfo: ImageLoaderInfo = {
};

const NETLIFY_LOADER_REGEX = /https?\:\/\/[^\/]+\.netlify\.app\/.+/;

/**
* Tests whether a URL is from a Netlify site. This won't catch sites with a custom domain,
* but it's a good start for sites in development. This is only used to warn users who haven't

0 comments on commit d87df45

Please sign in to comment.