Ability to opt-out of web-vitals
package that's currently bundled with Next.js
#15414
Replies: 7 comments 6 replies
-
Although it's tiny, I agree it's an additional cost if you're not using it to measure metrics at all. I wouldn't mind if we keep it included by default and have a flag to opt-out. @timneutkens do you agree? |
Beta Was this translation helpful? Give feedback.
-
There's likely a better approach possible here where we remove the web vitals package during compilation when reporting is not set up |
Beta Was this translation helpful? Give feedback.
-
Hi, Even in 2022 there is this problem, is there any way to fix it? Or is there any workaround? Thank you very much!! |
Beta Was this translation helpful? Give feedback.
-
Looks like this is only in the interest of the users and not maintainers, so it's probably up to someone outside Vercel to make a PR and hope they'll allow it. |
Beta Was this translation helpful? Give feedback.
-
Bump, it feels like it's an unnecessary bloat if one does not use it. |
Beta Was this translation helpful? Give feedback.
-
It is really annoying that Next.js increases bundle size with useless functionality. It is completely unnecessary in most of the projects. Web vitals should be opt in. |
Beta Was this translation helpful? Give feedback.
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
-
Feature request
Currently, Next.js adds
web-vitals
package and a file that handles it -- into the production bundle. Though it may be useful in many cases, my project does not rely on these metrics. It adds an extra KB of code and whatever the parsing resources it needs from the user's machine. This isn't much, but I think that in line with Next.js's telemetry opt-out we should be able to opt out of this feature as well.Describe the solution you'd like
Add a flag/setting in next.config.js to opt-out of
web-vitals
.Describe alternatives you've considered
The only thing to do here, as I understand, other than setting up the above flag is to fork Next.js.
Additional context
#15296
Beta Was this translation helpful? Give feedback.
All reactions