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

use sharedWorker inline has the same filename #324

Open
huyansheng3 opened this issue Jul 8, 2021 · 2 comments
Open

use sharedWorker inline has the same filename #324

huyansheng3 opened this issue Jul 8, 2021 · 2 comments

Comments

@huyansheng3
Copy link

the sharedworker for mutile tab,when every time inline URL.createObjectURL will produce new hash url, every tab will has a new sharedworker.

const source = 'importScript("https://anotherhost/worker.js")';
const url = 'data:application/javascript;base64,' + btoa(source);
const worker = new SharedWorker(url);

Base64 encoding gives a permanent URL until the source code changes. maybe should support this ?

  • Operating System:
  • Node Version:
  • NPM Version:
  • webpack Version:
  • worker-loader Version:

Feature Proposal

Feature Use Case

@alexander-akait
Copy link
Member

What is webpack version?

@Bdlhy
Copy link

Bdlhy commented Sep 3, 2021

How about webpack@4.
I have the same scenes to use SharedWorker with same url, when i want to use inline mode.
SharedWorker need same origin to fetch without login in worker.js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants