-
Notifications
You must be signed in to change notification settings - Fork 1
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
Handle font assets during build #201
Comments
Quick update, my above webpack config does not work at all. It worked locally from a combination of different configs (to get both the Path and URL correct) but neither one works alone. I just had to remove all the webpack config above, rely on the inbuilt fonts rule in I have tried to work out a better fix, but my webpack understanding is missing something. I do not understand how you manage it when the Path and URL is different e.g. @zpaceinvader made a good point yesterday in Slack about |
Will take a closer look to see if we can fix to you don't have to set the theme same in the config. |
Related #295 (also touches on the assets like fonts and images and having them moved to the respective build directories) |
@PeterBooker and @walbo is this still an open issue that needs to be handled? |
Fonts are handled by theme.json now. Can we close this issue @PeterBooker ? |
Yes, lets consider this closed @stian-overasen! |
By default the font assets are not touched during build, until
@wordpress/scripts:14.0.1
which adds a rule that dumps the font files at/fonts/*
which is not very useful.We would like for them to be bundled into
path/to/theme/build/
orpath/to/theme/build/fonts
with the other static assets.I used our project specific
webpack.config.js
to resolve the issue for now with these additions:However, it would be ideal to have this built into project base and to avoid having the hardcoded path.
The text was updated successfully, but these errors were encountered: