[v4][Nextjs] Import google font in global.css is broken when deployed on Production. #17006
-
Sorry because the google font is broken after go to Production. On dev is fine in this case. V3: Global.css just like this. @tailwind base; V4: @import "tailwindcss"; please support this. Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It looks like your Google Fonts are not loading correctly in production but work fine in development. Here are some possible reasons and solutions: Possible Causes & Fixes1. Incorrect @import syntax in V4Your updated V4 syntax is incorrect. The ✅ Solution: Use the correct
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot |
Beta Was this translation helpful? Give feedback.
It looks like your Google Fonts are not loading correctly in production but work fine in development. Here are some possible reasons and solutions:
Possible Causes & Fixes
1. Incorrect @import syntax in V4
Your updated V4 syntax is incorrect. The
@import
statement should not be followed bylayer(base);
. Instead, follow the standard import format.✅ Solution: Use the correct
@import
syntaxModify your global.css to this: