Skip to content

convert runtime plugins to object from - #1189

Open
lutejka wants to merge 1 commit into
nuxt:mainfrom
lutejka:traceable-nuxt-plugins
Open

lutejka wants to merge 1 commit into
nuxt:mainfrom
lutejka:traceable-nuxt-plugins

Conversation

@lutejka

@lutejka lutejka commented Dec 5, 2026

Copy link
Copy Markdown

📚 Description

Convert the runtime nuxt plugins to object form. This allows to identify those plugins when traced.

Before

GET / 200 106ms
+0.0ms request GET / 106ms
+15ms compile 197 modules 48ms
+14ms middleware GET / 0.4ms
+14ms middleware GET / 0.0ms
+14ms route GET / 200 88ms
+69ms render renderToString 25ms
+91ms plugin nuxt:head 0.1ms
+91ms plugin nuxt:router 0.3ms
+91ms plugin anonymous 0.0ms
+91ms plugin nuxt:revive-payload:server 0.0ms
+91ms plugin nuxt:global-components 0.0ms
+91ms plugin anonymous 0.1ms
+91ms plugin anonymous 0.0ms
+91ms plugin nuxt:checkIfLayoutUsed 0.0ms
+91ms hook app:created 0.4ms
...

After

GET / 200 39ms
+0.0ms request GET / 39ms
+30ms compile 2 modules 0.0ms
+29ms middleware GET / 0.1ms
+29ms middleware GET / 0.0ms
+29ms route GET / 200 5.0ms
+30ms render renderToString 1.7ms
+31ms plugin nuxt:head 0.0ms
+31ms plugin nuxt:router 0.0ms
+31ms plugin anonymous 0.0ms
+31ms plugin nuxt:revive-payload:server 0.0ms
+31ms plugin nuxt:global-components 0.0ms
+31ms plugin nuxt/devtools:server 0.0ms
+31ms plugin anonymous 0.0ms
+31ms plugin nuxt:checkIfLayoutUsed 0.0ms
+31ms hook app:created 0.1ms
...

@coderabbitai

coderabbitai Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Three Nuxt DevTools plugins now use object-form declarations with setup methods. The client plugin retains its existing checks, metrics, hooks, client initialisation, and console message. The server plugin retains its state initialisation and timestamp recording. The Vite DevTools plugin retains its module script creation and insertion into document.body.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to 65c12

This change names runtime plugins so they are identifiable in traces, with no intended behavior change. No actionable merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: runtime Nuxt plugins are converted to object form. The raw summary shows the three runtime plugin files changed to object-form defineNuxtPlugin declarations, so the t…
Description check Passed The description states that the runtime Nuxt plugins are converted to object form so that they can be identified when traced. It includes before and after trace output that shows the new nuxt/devtools…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: runtime Nuxt plugins are converted to object form. The raw summary shows the three runtime plugin files changed to object-form defineNuxtPlugin declarations, so the title matches the changeset. It is short and clear, though it has a typo ('from' should be 'form') and omits the reason (traceability).

Full details: Description check

Explanation

The description states that the runtime Nuxt plugins are converted to object form so that they can be identified when traced. It includes before and after trace output that shows the new nuxt/devtools:server plugin name. This relates directly to the changeset, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94c3fc73-7720-4b77-886b-cddb14779c87
Commits

Reviewing files that changed from the base of the PR and between ee09f7d and 65c12ce.

Files selected for processing: 3

  • packages/devtools/src/runtime/plugins/devtools.client.ts
  • packages/devtools/src/runtime/plugins/devtools.server.ts
  • packages/devtools/src/runtime/plugins/vite-devtools.client.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant