Skip to content

fix(utils): Rename global.ts -> worldwide.ts - #5969

Merged
AbhiPrasad merged 3 commits into
masterfrom
abhi-rename-global
Oct 17, 2022
Merged

fix(utils): Rename global.ts -> worldwide.ts#5969
AbhiPrasad merged 3 commits into
masterfrom
abhi-rename-global

Conversation

@AbhiPrasad

@AbhiPrasadAbhiPrasad commented Oct 17, 2022

Copy link
Copy Markdown
Contributor

fixes#5894
fixes#5773

Renames global.ts to worldwide.ts so we don't have issues with bundlers like as is described in https://docs.sentry.io/platforms/javascript/troubleshooting/#build-errors-with-vite.

Luckily the rest of our references to global is removed since we did changes with #5611.

It's not quite our responsibility to handle this, since Vite themselves recommends not use variables like global with the define setting, but we can unblock folks from not having build errors with our SDK, so I'm fine with this change. Opinions are welcome.

@AbhiPrasad
AbhiPrasad requested review from a team, lforst and lobsterkatie and removed request for a teamOctober 17, 2022 09:42
@AbhiPrasadAbhiPrasad changed the title fix(utils): Rename global.ts -> globalobject.tsfix(utils): Rename global.ts -> worldwide.tsOct 17, 2022
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
@sentry/browser - ES5 CDN Bundle (gzipped + minified)19.41 KB (-0.02% 🔽)
@sentry/browser - ES5 CDN Bundle (minified)60.09 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified)18.05 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified)52.97 KB (0%)
@sentry/browser - Webpack (gzipped + minified)19.76 KB (-0.03% 🔽)
@sentry/browser - Webpack (minified)64.28 KB (-0.01% 🔽)
@sentry/react - Webpack (gzipped + minified)19.79 KB (-0.03% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified)45.53 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)25.86 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)24.28 KB (0%)

@AbhiPrasad

Copy link
Copy Markdown
ContributorAuthor

Sizebot 🤔

@AbhiPrasadAbhiPrasad self-assigned this Oct 17, 2022

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lol why not :D

Probably one of the funniest fixes I've seen lately but if it works...

@AbhiPrasad
AbhiPrasad merged commit 0596b6f into masterOct 17, 2022
@AbhiPrasad
AbhiPrasad deleted the abhi-rename-global branch October 17, 2022 11:48
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Error Could not resolve './{}.js' from node_modules/@sentry/utils/esm/index.js vuejs Build Error @sentry/svelte

2 participants

@AbhiPrasad@Lms24