-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
@sentry/nextjs autoInstrumentServerFunctions
breaks next.js' font optimization
#8320
Comments
autoInstrumentServerFunctions
breaks next.js' font optimization
Thanks for writing in! We'll take a look at this! |
Thanks - you can find more info in the README of the reproduction github repository. |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Go ahead and reset the clock as this isn't resolved yet |
Hi @klaasman thanks for bumping. This is on our backlog, we'll take a look at it. |
I took a look at how Next.js implements this font optimization. It seems like Next.js does static code analysis to build a font a font manifest and the SDK breaks the manifest generation. I believe a fix is not that straight forward so it might take a while until we get to this. |
Thanks for diving into it. What parts of the sentry <-> next.js integration will be turned off if I disable sentry's |
@klaasman unfortunately quite a bit. |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
7.54.0
Framework Version
7.54.0
Link to Sentry event
No response
SDK Setup
Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: 1.0,
});
Steps to Reproduce
Clone the following repository: https://github.com/klaasman/sentry-nextjs-font-inlining-bug
npm install
npm run build
./.next/server/pages/index.html
, you will see that the font-loading is inlined (search for@font-face
)next.config.js
and comment out theautoInstrumentServerFunctions
linenpm run build
./.next/server/pages/index.html
, you will see that the font-loading is not inlined anymore (search for@font-face
)Expected Result
I expected next.js font optimization feature to work.
Actual Result
The
autoInstrumentServerFunctions
somehow disables next.js' font inlining feature. This setting is turned on by default, in this repository it is turned off in thenext.config.js
file.The text was updated successfully, but these errors were encountered: