-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(replay): Extract worker into dedicated package #7139
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
Conversation
Note: I've actually extracted the code to get the worker URL into the worker package. This way, we should be able to do any refactorings/experimentation etc. purely in that package, and replay itself doesn't really care what worker type you use, it just wants to get the appropriate URL and use it, done. Where |
@@ -0,0 +1,6 @@ | |||
import workerString from './worker'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if vendor
is the best name, but these are basically pre-built files.
We need this because workerString
is built by rollup at build-time, so we can't reference it at dev-time. I figured this is simple enough code to just pipe this through without any build step for now.
Note that this is transparent for the replay package, it doesn't really care about how we build stuff here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static
? not sure if that's any better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just merge it as vendor
for now and we can revisit this later, this is purely internal anyhow.
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -0,0 +1,6 @@ | |||
import workerString from './worker'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static
? not sure if that's any better
89130d5
to
201fad3
Compare
This supersedes #6665 and extracts part of #7025.
This moves the worker into a dedicated (private) @sentry-internal/replay-worker package. For now, this still builds the worker the same way as before (as a string).
It also adds the new
compress()
stateless function, but doesn't use it yet.