Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nextjs): Run source map upload in Vercel develop and preview environments #7436

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,6 @@ function shouldEnableWebpackPlugin(buildContext: BuildContext, userSentryOptions
// return false
}

if (process.env.VERCEL_ENV === 'preview' || process.env.VERCEL_ENV === 'development') {
return false;
}

// We've passed all of the tests!
return true;
}
Expand Down
34 changes: 0 additions & 34 deletions packages/nextjs/test/config/webpack/sentryWebpackPlugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,40 +240,6 @@ describe('Sentry webpack plugin config', () => {
false,
true,
],
[
'disables the plugin in Vercel `preview` environment',
exportedNextConfig,
{ VERCEL_ENV: 'preview' },
false,
false,
],
[
'disables the plugin in Vercel `development` environment',
exportedNextConfig,
{ VERCEL_ENV: 'development' },
false,
false,
],
[
'allows `disableClientWebpackPlugin = false` to override env vars`',
{
...exportedNextConfig,
sentry: { disableClientWebpackPlugin: false },
},
{ VERCEL_ENV: 'preview' },
false,
true,
],
[
'allows `disableServerWebpackPlugin = false` to override env vars`',
{
...exportedNextConfig,
sentry: { disableServerWebpackPlugin: false },
},
{ VERCEL_ENV: 'preview' },
true,
false,
],
])(
'%s',
async (
Expand Down