antd-scss-theme-plugin
antd-scss-theme-plugin copied to clipboard
theme.scss won't let me use @font-face
For example, adding this to my theme.scss won't let it compile due to a generic "SASS error". Any help is appreciated.
@font-face { font-family: 'BC Sans'; src: url('../assets/fonts/BCSans-Regular.woff'); }
The error:
Module build failed (from ./node_modules/antd-scss-theme-plugin/build/dist/lib/antdLessLoader.js): Could not compile the SCSS theme file "C:\Users\Luke\source\repos\bcgov\mds\services\minespace-web\src\styles\settings\theme.scss" for the purpose of variable extraction. This is likely because it contains a Sass error.
Hi @exzizt
Are you sure the error is on that line? Can you share the whole content of your theme.scss
file
I have the same problem, but i found solution. You can use in your theme.scss only $font-family variable. Your font you can load by @font-face in other scss file in project
@aproskurnov the $font-family in theme.scss does not support japanese word.
$font-family: "ヒラギノ角ゴ ProN W3";
same error as @exzizt