Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Performance tab with Web Vitals integration #594

Closed
Baroshem opened this issue Feb 6, 2024 · 7 comments
Closed

feat: Performance tab with Web Vitals integration #594

Baroshem opened this issue Feb 6, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@Baroshem
Copy link

Baroshem commented Feb 6, 2024

馃啋 Your use case

Having up to date info about the performance of the page (even in development) can be really useful. There is a module https://www.npmjs.com/package/@nuxtjs/web-vitals that integrates with the npm package with the same name that allows to display the values of the web vitals inside your console tab.

馃啎 The solution you'd like

I would love to see similar functionality in the devtools so that the users could observe there what are the current values of the metrics.

image

馃攳 Alternatives you've considered

Not really. The alternative is to use the Web Vitals

鈩癸笍 Additional info

Apart from just getting the values of metrics, w could also display some hints on what user could do to improve the value of certain metric.

@Baroshem Baroshem added the enhancement New feature or request label Feb 6, 2024
@Baroshem
Copy link
Author

Baroshem commented Feb 6, 2024

I can try to implement it if you like the idea :)

@antfu
Copy link
Member

antfu commented Feb 6, 2024

Sounds like a nice idea! Since we have the web-vital module, I guess it would be better to have the devtools integrations in the module directly.

@Baroshem
Copy link
Author

Baroshem commented Feb 6, 2024

So you would recommend to implement this as a part of the Web Vitals module, not the new tab in the devtools?

@antfu
Copy link
Member

antfu commented Feb 6, 2024

Modules could extend DevTools tabs: https://devtools.nuxt.com/module/guide, users would see the tab only when the module is installed. A lot of modules are doing this way

@Baroshem
Copy link
Author

Baroshem commented Feb 6, 2024

Yeah yeah, I understand that.

But in general, you would recommend to have this Performance tab only visible when a user has this module installed?

@antfu
Copy link
Member

antfu commented Feb 6, 2024

To me, it's not about when it is visible, it is about the scoping. If Nuxt has Web Vital built-in, then it makes sense to have it built in Nuxt DevTools. You can argue that there are a lot of things that are crucial to web development that might be worth including by default, like a11y, i18n, SEO, sitemaps, PWA..., and a lot of things. But it turns out that's the point of having modules - to allow each integration to be scoped and composed, while also allows different solutions and opinions to coexists.

@Baroshem
Copy link
Author

Baroshem commented Feb 6, 2024

Makes sense!

I will create an issue in the module repository then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants