Created
January 1, 2019 00:44
-
-
Save timbophillips/455ac41659fddcd774c5550650665b66 to your computer and use it in GitHub Desktop.
host roboto font and material icons locally in angular app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// npm install --save roboto-fontface material-icons | |
//// put the below stuff into src/styles.scss | |
// for npm roboto-fontface package (to load local files) | |
$roboto-font-path: "~roboto-fontface/fonts" !default; | |
@import "~roboto-fontface/css/roboto/sass/roboto-fontface"; | |
// for npm material-icons package (to load local files) | |
$material-icons-font-path: '~material-icons/iconfont/'; | |
@import '~material-icons/iconfont/material-icons.scss'; |
Apparently this isssue is fixed with Angular 15.0.2 again. Did not change the build, but now it works.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since Angular & Material v15 I get an error during build process:
Anyone knows how to solve it?
I tried the following suggestion: Add
in angular.json and remove the ~ from the imports. But this still loads the files from google and also leads to a 404 for the local files