Currently, I am importing a CSS library directly into my main CSS file like this:
@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css);
However, I would like to store it locally in my project and import it from its folder.
I attempted to download the file and save it in my assets/css/
directory, then added the path in angular.json
as shown below:
"styles": [
"src/styles.css",
"src/assets/css/all.min.css"
],
After running ng build
(which prints all the CSS files without errors) and launching ng serve
, I encountered a Failed to compile
error.
What is the cleanest way to achieve this? (without installing unnecessary files)