Hello,
I’m just new to using Sage(Sage 9.0.10) with Bedrock, and I encountered error on using custom fonts.
What I did so far:
-
Added font ( .ttf ) to resources/assets/fonts
-
Created _fonts.scss to resources/assets/styles/common
-
Inside _fonts.scss
@font-face {
font-family: “BigCaslon”;
src: url("…/…/fonts/BigCaslon.ttf") format(“truetype”);
font-weight: normal;
font-style: normal;
} -
Imported in main.scss “@import “common/fonts”;” but never used the font yet
-
Executed “npm run build” and will result to error.
ERROR Failed to compile with 2 errors
error in ./resources/assets/styles/main.scssModule build failed: ModuleBuildError: Module build failed: Error: resolve-url-loader: CSS error
predicate must return an absolute path or the result of calling next()
What did I miss? What is lacking step?
Please help, thanks