worker-loader
worker-loader copied to clipboard
use sharedWorker inline has the same filename
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
What is webpack version?
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
.