download worker script from other domain (cdn)
raronen opened this issue · 1 comments
raronen commented
Hi,
I want to download my worker scripts from CDN, it means that
__webpack_public_path__ = "https://amlogsextension-int.azureedge.net/" for e.g.
This isn't possible at the moment sense root is hardcoded with ./
in the following code inside worker-loader/src/index.js.
`const getPublicPath = file => {
const root = JSON.stringify("./");
const filePath = JSON.stringify(file);
return `${root} + __webpack_public_path__ + ${filePath}`;
};`
The problem that now getPublicPath returns the following string: "https://domain1/https://domain2/file.js"
It would be great if there'll be a ?customRoot option or something like that in the loader and then change the root initialization to const root = customRoot ? "" : JSON.stringify("./ + ");
I'll be happy to send a PR but I see I'm not authorized.