ref(nuxt): Remove defineNitroPlugin wrapper#19334
Merged
Conversation
andreiborza
reviewed
Feb 16, 2026
| } from '@sentry/core'; | ||
| import { defineNitroPlugin, useStorage } from 'nitropack/runtime'; | ||
| import type { NitroAppPlugin } from 'nitropack'; | ||
| import { useStorage } from 'nitropack/runtime'; |
Member
There was a problem hiding this comment.
q: Is there no top-level export for useStage? Iirc Pooya mentioned not needing to import from /runtime anymore.
Member
Author
There was a problem hiding this comment.
No, not in nitropack. Only from Nitro v3 onwards, it can be imported from nitro.
We probably need two different plugins for v2 and v3 here as we need the import for useStorage and useDatabase.
See docs here: https://v3.nitro.build/docs/migration#changed-nitro-subpath-imports
andreiborza
approved these changes
Feb 16, 2026
Contributor
Codecov Results 📊Generated by Codecov Action |
s1gr1d
added a commit
that referenced
this pull request
Feb 16, 2026
The wrapper is not needed, as it's just making the sure the types are correct. We can just use the type. For reference, this is the code for the wrapper: https://github.com/nitrojs/nitro/blob/f663e76df6b25610432c915f19d3cf7c5c19f72e/src/runtime/internal/plugin.ts Closes #19277
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The wrapper is not needed, as it's just making the sure the types are correct. We can just use the type.
For reference, this is the code for the wrapper: https://github.com/nitrojs/nitro/blob/f663e76df6b25610432c915f19d3cf7c5c19f72e/src/runtime/internal/plugin.ts
Closes #19277