-
Notifications
You must be signed in to change notification settings - Fork 252
docs(blog): add nuxt hints 1.0 announcement #2216
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
Open
huang-julien
wants to merge
6
commits into
main
Choose a base branch
from
blog/nuxt-hints-1.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+134
−0
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
642e49e
docs(blog): add nuxt hints 1.0 announcement
huang-julien 1509d33
Update content/blog/44.nuxt-hints-v1.md
huang-julien da27732
improve sentencs
huang-julien fd5af03
Merge branch 'blog/nuxt-hints-1.0' of https://github.com/nuxt/nuxt.co…
huang-julien d679f60
chore: add picture
huang-julien 4dcff1d
Update content/blog/44.nuxt-hints-v1.md
huang-julien File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| --- | ||
| title: Nuxt Hints 1.0 | ||
| description: Nuxt Hints helps you to find improvements at runtime in your Nuxt application. | ||
| navigation: false | ||
| image: /assets/blog/nuxt-hints-v1.png | ||
| authors: | ||
| - name: Julien Huang | ||
| avatar: | ||
| src: https://github.com/huang-julien.png | ||
| to: https://bsky.app/profile/JulienHuang_dev | ||
| date: 2026-03-19T00:00:00.000Z | ||
| category: Release | ||
| --- | ||
|
|
||
| ## We are very excited to move Nuxt hints from alpha stage to 1.0.0 ! | ||
|
|
||
| Last week at [VueJS Amsterdam](https://vuejs.amsterdam/), `@nuxt/hints` has been released in version 1.0. | ||
|
|
||
| This has been a long journey since its first commit in 2023. The vision of the Nuxt team has always been that better DX will improve end-users UX. By releasing this module, the goal is to help Nuxt developers to improve their Nuxt applications. | ||
|
huang-julien marked this conversation as resolved.
|
||
|
|
||
| ## Getting started | ||
|
|
||
| ```bash [Terminal] | ||
| npx nuxt module add hints | ||
| ``` | ||
|
|
||
| ### 🚀 Rich DevTools UI | ||
|
|
||
| Nuxt Hints integrates directly into the [Nuxt DevTools](https://devtools.nuxt.com/) with a dedicated panel. The homepage gives you a summary of all detected issues at a glance, across every category. Performance, hydration, third-party scripts, and more. | ||
|
|
||
| From there you can drill into each category, inspect specific elements, and get actionable recommendations without leaving your development environment. | ||
|
|
||
| ::tip | ||
| Every feature in Nuxt Hints surfaces results both in the DevTools UI **and** in your browser console. You can configure each feature independently to only show in one or the other. | ||
| :: | ||
|
|
||
| ### 💧 Hydration Mismatch Debugging | ||
|
|
||
| Hydration mismatches are one of the most frustrating issues in SSR applications. Nuxt Hints hooks into Vue's hydration process to compare the server-rendered DOM with the client-side DOM. When a mismatch is detected, it captures the pre- and post-hydration HTML and presents them in a **diff viewer**. | ||
|
|
||
| No more guessing what went wrong, you can see the exact differences between what the server rendered and what the client produced. | ||
|
|
||
| ### ✅ HTML Validation | ||
|
|
||
| Nuxt Hints includes a built-in HTML validation feature powered by [html-validate](https://html-validate.org/). On every server-rendered response, the module intercepts the HTML output and runs it through `html-validate`, catching invalid markup, accessibility issues, and common HTML mistakes before they reach production. | ||
|
|
||
| ### ⚡ Web Vitals Analysis | ||
|
|
||
| Nuxt Hints uses [`web-vitals`](https://github.com/GoogleChrome/web-vitals) to gather Core Web Vitals metrics in real time. It monitors **LCP** (Largest Contentful Paint), **INP** (Interaction to Next Paint), and **CLS** (Cumulative Layout Shift) and provides detailed attribution for each. | ||
|
|
||
| When a metric needs improvement, you get context-aware advice tied to the specific element causing the issue. For example, if your LCP element has `loading="lazy"`, Nuxt Hints will warn you: | ||
|
|
||
| ```text | ||
| [@nuxt/hints:performance] LCP Element should not have `loading="lazy"` | ||
| Learn more: https://web.dev/optimize-lcp/#optimize-the-priority-the-resource-is-given | ||
| ``` | ||
|
|
||
| ### 📦 Third-Party Script Auditing | ||
|
|
||
| Third-party scripts are a common source of performance bottlenecks. Nuxt Hints tracks every script loaded on your page using a combination of a Nitro plugin and client-side observers. The dashboard shows loading times, render-blocking status, and security attributes for each script. | ||
|
|
||
| It also checks for missing `crossorigin` attributes and other security best practices: | ||
|
|
||
| ```text | ||
| [@nuxt/hints] Third-party script "https://cdn.example.com/script.js" is missing crossorigin attribute. | ||
| Consider adding crossorigin="anonymous" for better security and error reporting. | ||
| ``` | ||
|
|
||
| ### 🧩 Unused Component Detection | ||
|
|
||
| At build time, a Vite plugin analyzes your component imports to identify statically imported `.vue` components. At runtime, the module tracks which of those components actually render during SSR and initial hydration. | ||
|
|
||
| After the page finishes loading, any imported component that was never rendered is flagged as a candidate for **lazy loading**. The recommended fix is to either prefix the component with `Lazy` (e.g., `<LazyHeavyComponent />`) or use `defineAsyncComponent` so it is only downloaded when needed. | ||
|
|
||
| This can have a significant impact on your initial bundle size and loading performance. | ||
|
|
||
| ## ⚙️ Configurable Features | ||
|
|
||
| Every feature can be toggled on or off independently. If you feel overwhelmed by the amount of feedback, you can disable some features and address things step by step: | ||
|
|
||
| ```ts [nuxt.config.ts] | ||
| export default defineNuxtConfig({ | ||
| hints: { | ||
| devtools: true, | ||
| features: { | ||
| hydration: true, | ||
| lazyLoad: true, | ||
| webVitals: true, | ||
| thirdPartyScripts: true, | ||
| htmlValidate: true, | ||
| }, | ||
| }, | ||
| }) | ||
| ``` | ||
|
|
||
| Each feature accepts either a `boolean` or an object for finer control over console logs and DevTools visibility: | ||
|
|
||
| ```ts [nuxt.config.ts] | ||
| export default defineNuxtConfig({ | ||
| hints: { | ||
| features: { | ||
| webVitals: { | ||
| logs: true, | ||
| devtools: true, | ||
| }, | ||
| // Disable console noise for hydration, keep DevTools only | ||
| hydration: { | ||
| logs: false, | ||
| devtools: true, | ||
| }, | ||
| }, | ||
| }, | ||
| }) | ||
| ``` | ||
|
|
||
| ## Moving forward | ||
|
|
||
| With 1.0 being released, this is only the beginning. | ||
|
|
||
| ### Production hints | ||
|
|
||
| Nuxt Hints will continue providing more information to developers. At the moment, it is a dev-only module. In the future, Nuxt Hints will let you report poor metrics in runtime applications. | ||
|
|
||
| ### Font and scripts performance hints | ||
|
|
||
| Nuxt Hints will provide more precise metrics on some of your application’s assets, especially fonts and scripts. | ||
|
|
||
| ### Your ideas ! | ||
|
|
||
| Nuxt is shaped by people and will continue to be driven by this community. Your ideas and feedback are always welcome and have an impact on the future of Nuxt. | ||
|
huang-julien marked this conversation as resolved.
|
||
|
|
||
| ## Credits | ||
|
|
||
| Huge thanks to our early contributors and testers, without whom this module wouldn't be what it is today. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use consistent naming/version wording in the announcement header.
Line 14 says “Nuxt hints” while title/frontmatter use “Nuxt Hints”, and Line 16 says “version 1.0” while intro says “1.0.0”. Align casing and version format for consistency.
Suggested patch
📝 Committable suggestion
🤖 Prompt for AI Agents