Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/nuxt/src/vite/addServerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function addDynamicImportEntryFileWrapper(

nitro.options.rollupConfig.plugins.push(
wrapEntryWithDynamicImport({
resolvedSentryConfigPath: createResolver(nitro.options.srcDir).resolve(`/${serverConfigFile}`),
resolvedSentryConfigPath: createResolver(nitro.options.rootDir).resolve(`/${serverConfigFile}`),
experimental_entrypointWrappedFunctions: moduleOptions.experimental_entrypointWrappedFunctions,
}),
);
Expand All @@ -131,7 +131,7 @@ function injectServerConfigPlugin(nitro: Nitro, serverConfigFile: string, isDebu
name: 'rollup-plugin-inject-sentry-server-config',

buildStart() {
const configPath = createResolver(nitro.options.srcDir).resolve(`/${serverConfigFile}`);
const configPath = createResolver(nitro.options.rootDir).resolve(`/${serverConfigFile}`);
Copy link

Choose a reason for hiding this comment

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

Fix lacks regression test coverage

Low Severity

This fix changes path resolution from nitro.options.srcDir to nitro.options.rootDir, but no unit, integration, or e2e test was added to verify the regression path. That leaves the behavior around serverConfigFile resolution unguarded against future regressions.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Copy link
Member Author

Choose a reason for hiding this comment

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

The E2E tests already test for that - if the server-side cannot be set up, it does not work.


if (!existsSync(configPath)) {
if (isDebug) {
Expand Down
Loading