-
Notifications
You must be signed in to change notification settings - Fork 10
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
Conversation
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', |
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.
Seems like we should be adding this plugin to the browser
dist only. The module dist should keep the require/import.
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.
Yup, it's only getting added here, for the browser builds.
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.
ahh your right, the way that github showed the diff let me to believe it was under module.
built off of the work in videojs/videojs-generate-rollup-config#40
built off of the work in videojs/videojs-generate-rollup-config#40
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 anid of
default
. This plugin does not do so and will end up removing thelines from the browser build altogether.