-
-
Notifications
You must be signed in to change notification settings - Fork 276
feat: support loading cross-origin workers through an inline proxy (options.crossOrigin
)
#143
Conversation
Codecov Report
@@ Coverage Diff @@
## master #143 +/- ##
=========================================
- Coverage 66.21% 62.5% -3.72%
=========================================
Files 5 5
Lines 74 80 +6
Branches 25 29 +4
=========================================
+ Hits 49 50 +1
- Misses 22 26 +4
- Partials 3 4 +1
Continue to review full report at Codecov.
|
Note: I've signed the CLA. |
options.crossOrigin
)
Codecov Report
@@ Coverage Diff @@
## master #143 +/- ##
=========================================
- Coverage 65.75% 62.5% -3.26%
=========================================
Files 5 5
Lines 73 80 +7
Branches 23 29 +6
=========================================
+ Hits 48 50 +2
- Misses 22 26 +4
- Partials 3 4 +1
Continue to review full report at Codecov.
|
This is a feature I'm looking for as well. I'm going to pull this down and test it out. |
# Conflicts: # README.md
README.md
Outdated
@@ -125,6 +126,24 @@ webpack assets is used | |||
} | |||
``` | |||
|
|||
### `crossOrigin` |
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 think this should be combined with the main Cross-Origin policy section or a note should be added there about this workaround.
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.
You also might want to add a note that this will have no effect if the inline
option is enabled.
README.md
Outdated
### `crossOrigin` | ||
|
||
Results in the use of an intermediate BLOB worker that will allow loading the worker code hosted on another origin. | ||
This is useful if you want to host your javascript and worker code on a CDN and only makes sense if you have |
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.
There's another way this can be useful, if you use the __webpack_public_path__
option. I'd suggest updating this to link to the main webpack docs instead:
This is useful if you want to host your javascript and worker code on a CDN and only makes sense if you have configured a publicPath globally in webpack or local to this loader that is an
http://
orhttps://
url.
This is useful if you want to host your javascript and worker code on a CDN and only makes sense if you have configured a publicPath [globally in webpack](https://webpack.js.org/guides/public-path/) or local to this loader that is an `http://` or `https://` url.
@apexskier thanks for your review. Could you take a stab at making the suggested adjustments and I'll merge them into this PR? |
@ggoodman Here's a PR. It also merges with master, so it's a little messy. If you |
Feat cross origin
@apexskier thanks!. As you guessed, I couldn't make anything of the PR against my branch but having merged I can now see that it LGTM. |
@apexskier Unfortunately, we do not have enough time and energy for the current loader, maybe you want to become a champion and solve issues? |
@evilebottnawi @ggoodman any plans of getting this merged and released ? |
Same issue - #225 feel free to send a new PR |
No description provided.