Fix adding RxPlayer to the global scope for bundles #1542
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently noticed while doing quick-and-dirty RxPlayer tests that the bundles we attach to each release note (and publish to npm, even though that's not what is used when importing the RxPlayer) was not exposing the
RxPlayertowindow- which I suppose is how most people would be interacting with that bundle.It seems that the v4.1.0 release note for example has such a bundle right now (maybe I'll update it there, though bundles published to npm cannot be retroactively updated).
The issue might have appeared when we removed the webpack dependency, there was an option in our bundling script to expose the RxPlayer but it was never set - thus the fix here is pretty simple.
PS: On that matter, I'm not sure publishing bundles to npm serve a role, as people relying on the
npmregistry are most likely relying onimport/requirestatements and do not just manually copy one of the bundle files that would be downloaded after callingnpm install/yarn. Bundles would still be accessible through release notes. Though it seems many people still rely on bundles (for simplicity reasons?), so maybe people actually DO that? (no idea how they get that bundle here)