You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3a61fbb
Browse filesBrowse the repository at this point in the historyBrowse files
feat(nuxt): Detect the server API with @nuxt/kit 4.6 (#25138)
Bumps `@nuxt/kit` to `^4.6.0` for `resolveServerVariant`. The Vite
server and other non-Nitro builders need this server-API detection.
Looks like a lot of code changes, but most of it is just moved code.
Those are the important parts:
- `resolveServerApi()` replaces `getNitroMajorVersion` and the
`local-pkg` dependency (we can get the nitro version from there). This
is actually the most important and biggest change in the PR.
- On the `nuxt` server API (no Nitro), the module skips all Nitro setup.
With this, Kit prints no `NUXT_B8024` warnings
- `addServerPlugin` → `addNitroPlugin`. Kit 4.6 deprecates the old name,
and the behavior is the same
- all nitro-related code moves to `nitroServer.ts`
Part of #25072
`[Sentry] Bundled \`${serverConfigFile}\` into the Nitro server build. The SDK initializes itself at server startup — no \`node --import\` preload needed.`,
206
-
);
207
-
});
208
-
}
209
-
}else{
210
-
consoleSandbox(()=>{
211
-
// eslint-disable-next-line no-console
212
-
console.warn(
213
-
`[Sentry] \`autoInjectServerSentry: '${moduleOptions.autoInjectServerSentry}'\` is deprecated and will be removed in a future major version. The Sentry server config is bundled into the Nitro server build by default now. Remove the option to use the default behavior.`,
`[Sentry] Bundled \`${serverConfigFile}\` into the Nitro server build. The SDK initializes itself at server startup — no \`node --import\` preload needed.`,
`[Sentry] \`autoInjectServerSentry: '${injectMode}'\` is deprecated and will be removed in a future major version. The Sentry server config is bundled into the Nitro server build by default now. Remove the option to use the default behavior.`,
101
+
);
102
+
});
103
+
104
+
if(injectMode==='top-level-import'){
105
+
// Nitro 3 (in Nuxt 5) is not bundled in dev mode, so there is no build to emit into.
0 commit comments