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

fix: mark global as global via externalGlobals #40

Merged
merged 1 commit into from
Sep 21, 2021
Merged

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Aug 26, 2021

Using the built-in globals feature will try and do interop resolution
for requiring window which will break if a user has an element with an
id of default. This plugin does not do so and will end up removing the
lines from the browser build altogether.

Using the built-in globals feature will try and do interop resolution
for requiring `window` which will break if a user has an element with an
id of `default`. This plugin does not do so and will end up removing the
lines from the browser build altogether.
@@ -92,6 +90,7 @@ const ORDERED_DEFAULTS = {
'resolve',
'json',
'commonjs',
'externalGlobals',
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like we should be adding this plugin to the browser dist only. The module dist should keep the require/import.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, it's only getting added here, for the browser builds.

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh your right, the way that github showed the diff let me to believe it was under module.

@gkatsev gkatsev merged commit d7fda4b into main Sep 21, 2021
@gkatsev gkatsev deleted the global-external branch September 21, 2021 20:27
gkatsev added a commit to videojs/video.js that referenced this pull request Sep 21, 2021
gkatsev added a commit to videojs/http-streaming that referenced this pull request Sep 21, 2021
gkatsev added a commit to videojs/video.js that referenced this pull request Sep 22, 2021
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
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.

2 participants