Tech »  Topic »  Angular 17 + Mathlive: How I Solved the .woff2 Loader Error

Angular 17 + Mathlive: How I Solved the .woff2 Loader Error


by Wabinab July 23rd, 2025

Either use a CDN, or if you cannot access to the internet, host them yourself. You also need to make modifications to the folder you installed using npm install (or equivalent) so the compiler stop squawking errors.

One had a program that was built with Angular 17, but when one tried to run ng build, it had a problem.

No loader is configured for ".woff2" files: node_modules/mathlive/fonts/KaTeX_Caligraphic-Bold.woff2

    node_modules/mathlive/mathlive-fonts.css:1:254:
      1 │ ...ight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("wof...

This line kept repeating itself in the console. It's caused by a library called mathlive that one used to, well, render math. (No, don't ask me why one don't use alternative library; there's a reason why I use this library instead of other rendering libraries, and that one won't go into details). One ...


Copyright of this story solely belongs to hackernoon.com . To see the full text click HERE