-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Esbuild] Creating a font-face with a local font throws "No loader is configured for .ttf/.woff/.woff2 files" #25756
Comments
How is the project using the |
Hey Charles, it's a global stylesheet |
Same problem for me, but with an imported stylesheet. It works with |
Same here. I'm struggling with that for several days. It looks like some people use
but I've no idea how to do this with the angular builder. |
Can you setup a minimal repro please? You can read here why this is needed. A good way to make a minimal repro is to create a new app via This might be related to your directory structure so its really important to get an accurate repro to diagnose this. |
It's not that "minimal", but I've setup a repro here: https://github.com/CommonGuy/angular-esbuild-ttf-repro.
Note: A similar issue #25235 was closed. But since esbuild can handle this case just fine during |
Facing the same problem (also with the monaco editor). This is blocking us from switching to esbuild atm. |
A load option has been added and will be available in 17.1.0 which is currently in prerelease. See: #26371 for more context. |
@alan-agius4 Thanks for fixing this issue. If I see this correctly, there is no 17.1.0 prerelease for the Angular CLI yet? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
build, serve
Is this a regression?
The previous version in which this bug was not present was
No response
Description
We are currently migrating our application from a custom webpack to esbuild and encountered a build error when creating a custom font face.
There is a similar issue mentioned in #23698 in the conversation here. It looks like the bug was fixed in #23706 and pushed in v14.1.x but it seems to reproduce again.
I added a number of debuggers in css-resource-plugin.js to see if the the font files are found and read and it seems like they are picked up:
node_modules/@angular-devkit/build-angular/src/tools/esbuild/stylesheets/css-resource-plugin.js
output:
Any help is appreciated.
Minimal Reproduction
angular.json
src/app/content/shared/css/fonts.css
src/app/content/shared/icons folder contains the three fonts that are part of the url from the above font-face
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: