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

When building an Angular 17 project, an error occurs due to unconfigured loaders for .woff2 files. The library being used, mathlive, relies on these font files. While running ng serve works without issues, ng build fails. The need for local execution arises because the client prohibits internet access, making CDN options unfeasible. Due to Angular's switch from Webpack to ESBuild, customizing the build process becomes challenging. As a workaround, solutions must focus on hosting necessary scripts locally by writing a controller for managing resource links.
The issue arises while attempting to run ng build with Angular 17, which is unable to process .woff2 files due to the absence of a configured loader.
Unfortunately, my client refused to connect his/her computer to the internet for security issues, so everything needs to run locally; and CDN became a non-viable option.
One might be able to modify the webpack.config.json or the equivalent in ESBuild, to configure a loader; however, Angular 17 no longer uses webpack.
Considering the challenges with configuring loaders or using CDNs, hosting scripts locally via a controller to manage <link> and <script> tags becomes essential.
Read at Hackernoon
[
|
]