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

ref(replay): Inline lodash dependency into build #6483

Merged
merged 1 commit into from Dec 9, 2022
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 9, 2022

This PR changes the replay build to inline the lodash.debounce dependency.
There can be potentially build issues with this, as lodash is commonjs. Eventually we may want to replace this with a custom implementation, but for now including it in the bundle should be fine.

Closes #6474

@mydea mydea requested review from billyvg and Lms24 December 9, 2022 10:19
@mydea mydea self-assigned this Dec 9, 2022
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Agreed, good fix until we replace debounce. Tried it out with ESM and it still seems to work.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.68 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 60.94 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.46 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 54.49 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.26 KB (0%)
@sentry/browser - Webpack (minified) 66.24 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.29 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.28 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.66 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.11 KB (+0.02% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 41.8 KB (-0.01% 🔽)
@sentry/replay - Webpack (gzipped + minified) 37.93 KB (+0.08% 🔺)

@mydea mydea merged commit 3dc61a5 into master Dec 9, 2022
@mydea mydea deleted the fn/inline-lodash branch December 9, 2022 12:02
Sign up for free to 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.

[Replay] Uncaught TypeError: debounce.default is not a function
2 participants