Skip to content

Commit

Permalink
fix(material/schematics): don't add the preconnect for fonts (#28026)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMeche authored Oct 31, 2023
1 parent 311b8ae commit 395309b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/material/schematics/ng-add/fonts/material-fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ export function addFontsToIndex(options: Schema): Rule {
throw new SchematicsException('No project index HTML file could be found.');
}

const preconnect = `<link rel="preconnect" href="https://fonts.gstatic.com">`;
const fonts = [
'https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap',
'https://fonts.googleapis.com/icon?family=Material+Icons',
];

projectIndexFiles.forEach(indexFilePath => {
appendHtmlElementToHead(host, indexFilePath, preconnect);

fonts.forEach(font => {
appendHtmlElementToHead(host, indexFilePath, `<link href="${font}" rel="stylesheet">`);
});
Expand Down

0 comments on commit 395309b

Please sign in to comment.