Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 4a02865

Browse files
fix: skip processing of remote stylesheets (#75)
Previously, we tried to read remote stylesheets using `readFile`. Related to angular/angular-cli#20794 Co-authored-by: Jason Miller <developit@users.noreply.github.com>
1 parent 1e1c768 commit 4a02865

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/critters/src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,12 @@ export default class Critters {
240240
.substring(pathPrefix.length)
241241
.replace(/^\//, '');
242242
}
243+
244+
// Ignore remote stylesheets
245+
if (/^https:\/\//.test(normalizedPath) || href.startsWith('//')) {
246+
return undefined;
247+
}
248+
243249
const filename = path.resolve(outputPath, normalizedPath);
244250

245251
let sheet;

0 commit comments

Comments
 (0)