Fix import.meta.url inside web workers#4186
Merged
guybedford merged 4 commits intorollup:masterfrom Jul 24, 2021
ceifa:master
Merged
Fix import.meta.url inside web workers#4186guybedford merged 4 commits intorollup:masterfrom ceifa:master
guybedford merged 4 commits intorollup:masterfrom
ceifa:master
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4186 +/- ##
=======================================
Coverage 98.34% 98.34%
=======================================
Files 202 202
Lines 7230 7232 +2
Branches 2114 2116 +2
=======================================
+ Hits 7110 7112 +2
Misses 58 58
Partials 62 62
Continue to review full report at Codecov.
|
Contributor
|
Thanks for the PR. How about we flip the order and make it |
Contributor
Author
Thanks for reviewing! Just pushed this suggestion. :) |
guybedford
reviewed
Jul 24, 2021
guybedford
approved these changes
Jul 24, 2021
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains:
Are tests included?
Breaking Changes?
Description
If I compile a library that uses
import.meta.urlinternally using UMD, it will break if I try to use it inside web workers, that happens because today rollup compileimport.meta.urlto use nodejs require or browser document API, but both is unavailable inside web workers. This PR adds a check for it and try to uselocation.href, if available.