René's URL Explorer Experiment


Title: fix(nextjs): Support custom `distDir` values in default `RewriteFrames` integration by lobsterkatie · Pull Request #4017 · getsentry/sentry-javascript · GitHub

Open Graph Title: fix(nextjs): Support custom `distDir` values in default `RewriteFrames` integration by lobsterkatie · Pull Request #4017 · getsentry/sentry-javascript

X Title: fix(nextjs): Support custom `distDir` values in default `RewriteFrames` integration by lobsterkatie · Pull Request #4017 · getsentry/sentry-javascript

Description: This is a follow-up to #3990, which makes sure sourcemaps get uploaded from the correct spot when using the nextjs distDir option. To make sure that the filenames in stacktrace frames match the names of said sourcemaps, we use the RewriteFrames integration. Up until now, we've been hardcoding the replacement it should make, based on nextjs's default output directory. This makes it dynamic, by injecting code at build time which adds the relevant value into global, where it is accessible at runtime when we're instantiating the integration. TODO: Integrate user includes in getWebpackPluginOptions - this will happen in a separate PR

Open Graph Description: This is a follow-up to #3990, which makes sure sourcemaps get uploaded from the correct spot when using the nextjs distDir option. To make sure that the filenames in stacktrace frames match the na...

X Description: This is a follow-up to #3990, which makes sure sourcemaps get uploaded from the correct spot when using the nextjs distDir option. To make sure that the filenames in stacktrace frames match the na...

Opengraph URL: https://github.com/getsentry/sentry-javascript/pull/4017

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:93153b14-08ae-f794-75bf-2568a8193ac7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE2CA:20F35A:14D6D65:1C97690:6B0576B2
html-safe-nonce779a4025de2136268ced56a2c42d29ebe80e800f2804a6844913c0c48a724c4a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkNBOjIwRjM1QToxNEQ2RDY1OjFDOTc2OTA6NkIwNTc2QjIiLCJ2aXNpdG9yX2lkIjoiODg3NjgxMDQ3ODk5NTk5NDI5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac818c41d76ae58c36ec35fb75333121ef3b16340e656f203e287935b122049c8e
hovercard-subject-tagpull_request:745210184
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/getsentry/sentry-javascript/pull/4017/files
twitter:imagehttps://avatars.githubusercontent.com/u/14812505?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/14812505?s=400&v=4
og:image:altThis is a follow-up to #3990, which makes sure sourcemaps get uploaded from the correct spot when using the nextjs distDir option. To make sure that the filenames in stacktrace frames match the na...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None507b2d62524c0f595c35a2a2ee8a6ec54b119f245b3c59eaa070013b70ed1ada
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee7a883ae3b439b8952652eaa7803e2587f30e339
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/pull/4017/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F4017%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F4017%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/pull/4017/files
Reloadhttps://github.com/getsentry/sentry-javascript/pull/4017/files
Reloadhttps://github.com/getsentry/sentry-javascript/pull/4017/files
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues334 (334)https://github.com/getsentry/sentry-javascript/issues
Pull requests54 (54)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgetsentry%2Fsentry-javascript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgetsentry%2Fsentry-javascript%2Fissues%2Fnew%2Fchoose
lobsterkatiehttps://github.com/lobsterkatie
masterhttps://github.com/getsentry/sentry-javascript/tree/master
kmclb-nextjs-support-distdirhttps://github.com/getsentry/sentry-javascript/tree/kmclb-nextjs-support-distdir
Conversation 41 https://github.com/getsentry/sentry-javascript/pull/4017
Commits 7 https://github.com/getsentry/sentry-javascript/pull/4017/commits
Checks 0 https://github.com/getsentry/sentry-javascript/pull/4017/checks
Files changed https://github.com/getsentry/sentry-javascript/pull/4017/files
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
fix(nextjs): Support custom distDir values in default RewriteFrames integration https://github.com/getsentry/sentry-javascript/pull/4017/files#top
Show all changes 7 commits https://github.com/getsentry/sentry-javascript/pull/4017/files
6611e0a add `distDir` to nextjs config type lobsterkatie Oct 11, 2021 https://github.com/getsentry/sentry-javascript/pull/4017/commits/6611e0a495b32946df3312a6b1d9bb4046da9ef1
f3bce8c allow for injecting multiple files at once into webpack `entry` entries lobsterkatie Oct 11, 2021 https://github.com/getsentry/sentry-javascript/pull/4017/commits/f3bce8c013c57bd8e330eece5669dab745b6d248
ef5a0bd vendor regex-escaping code lobsterkatie Oct 11, 2021 https://github.com/getsentry/sentry-javascript/pull/4017/commits/ef5a0bd90946163426dabc5c465f48992a87f4e7
671bcc9 inject `distDir` into global at build time lobsterkatie Oct 11, 2021 https://github.com/getsentry/sentry-javascript/pull/4017/commits/671bcc968098d96659b6a6d1e8f0c04a9db47ea4
8a4c43e use stored `distDir` value in rewrite frames integration lobsterkatie Oct 11, 2021 https://github.com/getsentry/sentry-javascript/pull/4017/commits/8a4c43e6f84053cffc7124415c29a9fa800bdf16
ea1368b fix tests lobsterkatie Oct 12, 2021 https://github.com/getsentry/sentry-javascript/pull/4017/commits/ea1368bd47043e22575e5a58a9f1098a42739577
c321ade apply code review suggestions lobsterkatie Oct 12, 2021 https://github.com/getsentry/sentry-javascript/pull/4017/commits/c321ade567c73f5f62f1b175cf05603330777f69
Clear filters https://github.com/getsentry/sentry-javascript/pull/4017/files
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
types.ts https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-8e3c00802ba457fc07b57c73df10e7719aa757060f8ae47da6329a1d92e08bc4
webpack.ts https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-55396f0a8f12ba2eb7ce27f3cf886f946c29c2aa93b5d2f993dadbd5a9f3cc75
index.server.ts https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-0942a26140e4282a046cc2e4bde7cb0ea0170e49b0a52a3f6f3873e4b10367ce
config.test.ts https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
index.server.test.ts https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-d39dcc7af821534bdb07f9110558e9b8617085566837ff722e5da3ba9f08ae8a
string.ts https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-9b50bdcf9d922aa7d14b9be1a170a437df47378c6ee3576efaaedcdf7389f503
packages/nextjs/src/config/types.tshttps://github.com/getsentry/sentry-javascript/pull/4017/files#diff-8e3c00802ba457fc07b57c73df10e7719aa757060f8ae47da6329a1d92e08bc4
View file https://github.com/getsentry/sentry-javascript/blob/c321ade567c73f5f62f1b175cf05603330777f69/packages/nextjs/src/config/types.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/4017/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-8e3c00802ba457fc07b57c73df10e7719aa757060f8ae47da6329a1d92e08bc4
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-8e3c00802ba457fc07b57c73df10e7719aa757060f8ae47da6329a1d92e08bc4
packages/nextjs/src/config/webpack.tshttps://github.com/getsentry/sentry-javascript/pull/4017/files#diff-55396f0a8f12ba2eb7ce27f3cf886f946c29c2aa93b5d2f993dadbd5a9f3cc75
View file https://github.com/getsentry/sentry-javascript/blob/c321ade567c73f5f62f1b175cf05603330777f69/packages/nextjs/src/config/webpack.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/4017/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-55396f0a8f12ba2eb7ce27f3cf886f946c29c2aa93b5d2f993dadbd5a9f3cc75
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-55396f0a8f12ba2eb7ce27f3cf886f946c29c2aa93b5d2f993dadbd5a9f3cc75
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-55396f0a8f12ba2eb7ce27f3cf886f946c29c2aa93b5d2f993dadbd5a9f3cc75
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
iker-barriocanalhttps://github.com/iker-barriocanal
Oct 12, 2021https://github.com/getsentry/sentry-javascript/pull/4017/files#r727067400
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
lobsterkatiehttps://github.com/lobsterkatie
Oct 12, 2021https://github.com/getsentry/sentry-javascript/pull/4017/files#r727326568
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-55396f0a8f12ba2eb7ce27f3cf886f946c29c2aa93b5d2f993dadbd5a9f3cc75
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-55396f0a8f12ba2eb7ce27f3cf886f946c29c2aa93b5d2f993dadbd5a9f3cc75
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-55396f0a8f12ba2eb7ce27f3cf886f946c29c2aa93b5d2f993dadbd5a9f3cc75
packages/nextjs/src/index.server.tshttps://github.com/getsentry/sentry-javascript/pull/4017/files#diff-0942a26140e4282a046cc2e4bde7cb0ea0170e49b0a52a3f6f3873e4b10367ce
View file https://github.com/getsentry/sentry-javascript/blob/c321ade567c73f5f62f1b175cf05603330777f69/packages/nextjs/src/index.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/4017/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-0942a26140e4282a046cc2e4bde7cb0ea0170e49b0a52a3f6f3873e4b10367ce
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-0942a26140e4282a046cc2e4bde7cb0ea0170e49b0a52a3f6f3873e4b10367ce
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-0942a26140e4282a046cc2e4bde7cb0ea0170e49b0a52a3f6f3873e4b10367ce
iker-barriocanalhttps://github.com/iker-barriocanal
Oct 12, 2021https://github.com/getsentry/sentry-javascript/pull/4017/files#r727086079
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Next.js docshttps://nextjs.org/docs/api-reference/next.config.js/setting-a-custom-build-directory
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
lobsterkatiehttps://github.com/lobsterkatie
Oct 12, 2021https://github.com/getsentry/sentry-javascript/pull/4017/files#r727341613
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
in the server constructorhttps://github.com/vercel/next.js/blob/c78d8fad19e70a71fe9975984bf6f59e3bfb27bb/packages/next/server/next-server.ts#L189-L203
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
iker-barriocanalhttps://github.com/iker-barriocanal
Oct 13, 2021https://github.com/getsentry/sentry-javascript/pull/4017/files#r727988367
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-0942a26140e4282a046cc2e4bde7cb0ea0170e49b0a52a3f6f3873e4b10367ce
packages/nextjs/test/config.test.tshttps://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
View file https://github.com/getsentry/sentry-javascript/blob/c321ade567c73f5f62f1b175cf05603330777f69/packages/nextjs/test/config.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/4017/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-77b0b00c56cf44540996ecbef4caef9f3cf9bf4e9a3176e9d7f028e3b328868d
packages/nextjs/test/index.server.test.tshttps://github.com/getsentry/sentry-javascript/pull/4017/files#diff-d39dcc7af821534bdb07f9110558e9b8617085566837ff722e5da3ba9f08ae8a
View file https://github.com/getsentry/sentry-javascript/blob/c321ade567c73f5f62f1b175cf05603330777f69/packages/nextjs/test/index.server.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/4017/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-d39dcc7af821534bdb07f9110558e9b8617085566837ff722e5da3ba9f08ae8a
https://github.com/getsentry/sentry-javascript/pull/4017/files#diff-d39dcc7af821534bdb07f9110558e9b8617085566837ff722e5da3ba9f08ae8a
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/4017/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.