Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

refactor: webpack SharedWorker #178

Closed
wants to merge 2 commits into from

Conversation

wizard-a
Copy link

@wizard-a wizard-a commented Jan 2, 2019

This PR contains a:

  • bugfix
  • [x ] new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

no

Breaking Changes

no

Additional Info

add isLoaderWorker options

@jsf-clabot
Copy link

jsf-clabot commented Jan 2, 2019

CLA assistant check
All committers have signed the CLA.

@@ -24,15 +32,15 @@ module.exports = function (content, url) {
blob = new Blob([content]);
}

return new Worker(URL.createObjectURL(blob));
return new createWorker(URL.createObjectURL(blob), options.isSharedWorker);
Copy link

Choose a reason for hiding this comment

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

Mistype?

Copy link

Choose a reason for hiding this comment

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

Confusing to see both new and CreateWorker(), that not looks like a constructor

Copy link
Author

Choose a reason for hiding this comment

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

sorry, new and CreateWorker() resolve

@p3x-robot
Copy link

is there any progress on shared workers? it would be cool if i use another tab re-using the same worker, would be much faster

module.exports = function (content, url) {
function CreateWorker(url, isSharedWorker) {
if (isSharedWorker) {
return new isSharedWorker(url);

Choose a reason for hiding this comment

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

Suggested change
return new isSharedWorker(url);
return new SharedWorker(url);

zeripath added a commit to zeripath/worker-loader that referenced this pull request Jun 27, 2020
This is a slightly adjusted version of webpack-contrib#178

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/worker-loader that referenced this pull request Jun 27, 2020
This is a slightly adjusted version of webpack-contrib#178

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/worker-loader that referenced this pull request Jun 27, 2020
This is a slightly adjusted version of webpack-contrib#178

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/worker-loader that referenced this pull request Jun 27, 2020
This is a slightly adjusted version of webpack-contrib#178

Signed-off-by: Andrew Thornton <art27@cantab.net>
@alexander-akait
Copy link
Member

Done here #247

TheLD6978 pushed a commit to TheLD6978/worker-loader that referenced this pull request Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants