rohanray / next-fonts

Import fonts in Next.js (supports woff, woff2, eot, ttf, otf & svg)
179 stars 12 forks source link

Not compatible with Next.js built-in CSS support #26

Closed jorrit closed 4 years ago

jorrit commented 4 years ago

When Next.js built-in CSS is enabled the fonts are not copied to the build directory properly. Instead of their original content, they contain text like:

module.exports = "/_next/static/chunks/fonts/myfont-8a32f82e77541bcdf4524e59e96b5572.woff";

Perhaps this commit from next-images can be applied here as well:

https://github.com/twopluszero/next-images/commit/211f6649d3af3257a83c5d16ccf4b46e096ae87c

rohanray commented 4 years ago

@jorrit : Thanks for reporting! Applied the same fix as mentioned by you. Please test version 1.1.0.

Regards -RR