Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/nextjs/src/config/webpackPluginOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ export function getWebpackPluginOptions(
);
}

// TODO: We should think about uploading these when `widenClientFileUpload` is `true`. They may be useful in some situations.
// We want to include main-* files if widenClientFileUpload is true as they have proven to be useful
if (!sentryBuildOptions.widenClientFileUpload) {
sourcemapUploadIgnore.push(path.posix.join(distDirAbsPath, 'static', 'chunks', 'main-*'));
}

// Always ignore framework, polyfills, and webpack files
sourcemapUploadIgnore.push(
path.posix.join(distDirAbsPath, 'static', 'chunks', 'framework-*'),
path.posix.join(distDirAbsPath, 'static', 'chunks', 'framework.*'),
path.posix.join(distDirAbsPath, 'static', 'chunks', 'main-*'),
path.posix.join(distDirAbsPath, 'static', 'chunks', 'polyfills-*'),
path.posix.join(distDirAbsPath, 'static', 'chunks', 'webpack-*'),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ describe('getWebpackPluginOptions()', () => {
expect(generatedPluginOptions.sourcemaps).toMatchObject({
assets: ['/my/project/dir/.next/static/chunks/pages/**', '/my/project/dir/.next/static/chunks/app/**'],
ignore: [
'/my/project/dir/.next/static/chunks/main-*',
'/my/project/dir/.next/static/chunks/framework-*',
'/my/project/dir/.next/static/chunks/framework.*',
'/my/project/dir/.next/static/chunks/main-*',
'/my/project/dir/.next/static/chunks/polyfills-*',
'/my/project/dir/.next/static/chunks/webpack-*',
],
Expand All @@ -170,7 +170,6 @@ describe('getWebpackPluginOptions()', () => {
ignore: [
'/my/project/dir/.next/static/chunks/framework-*',
'/my/project/dir/.next/static/chunks/framework.*',
'/my/project/dir/.next/static/chunks/main-*',
'/my/project/dir/.next/static/chunks/polyfills-*',
'/my/project/dir/.next/static/chunks/webpack-*',
],
Expand All @@ -197,7 +196,6 @@ describe('getWebpackPluginOptions()', () => {
ignore: [
'C:/my/windows/project/dir/.dist/v1/static/chunks/framework-*',
'C:/my/windows/project/dir/.dist/v1/static/chunks/framework.*',
'C:/my/windows/project/dir/.dist/v1/static/chunks/main-*',
'C:/my/windows/project/dir/.dist/v1/static/chunks/polyfills-*',
'C:/my/windows/project/dir/.dist/v1/static/chunks/webpack-*',
],
Expand Down
Loading