Skip to content

ref(nuxt): Remove defineNitroPlugin wrapper#19334

Merged
s1gr1d merged 1 commit intodevelopfrom
sig/remove-defineNitroPlugin
Feb 16, 2026
Merged

ref(nuxt): Remove defineNitroPlugin wrapper#19334
s1gr1d merged 1 commit intodevelopfrom
sig/remove-defineNitroPlugin

Conversation

@s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented 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

@s1gr1d s1gr1d requested a review from logaretm February 16, 2026 11:23
} from '@sentry/core';
import { defineNitroPlugin, useStorage } from 'nitropack/runtime';
import type { NitroAppPlugin } from 'nitropack';
import { useStorage } from 'nitropack/runtime';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: Is there no top-level export for useStage? Iirc Pooya mentioned not needing to import from /runtime anymore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Codecov Results 📊


Generated by Codecov Action

@s1gr1d s1gr1d enabled auto-merge (squash) February 16, 2026 11:34
@s1gr1d s1gr1d merged commit 1063860 into develop Feb 16, 2026
42 checks passed
@s1gr1d s1gr1d deleted the sig/remove-defineNitroPlugin branch February 16, 2026 11:38
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
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.

[Nuxt] Remove usages of defineNitroPlugin as it's only a type-wrapper

2 participants