You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.
It could be that my issue is related to other issues I could check before on that repo, or similar ones related to webpack itself. But I can't get it solved so I am posting it here, sorry in advance.
So I build my workers in inline mode as recommended in the documentation because I want to be able to run them when my assets are hosted onto a CDN and therefore they cannot be executed after being downloaded from there. Here is my webpack config settings for worker files:
And here is how I import a worker into the module I use it:
import MyWorker from '../workers/my.worker.js';
That is pretty much it for workers. Now everything runs fine in development mode (using HMR). But in production mode, my browser complains that it cannot download the following file (note: I am visiting the page https://localhost:8000/page/1):
I see two problems here: obviously the path is wrong, somehow it is a concatenation of the current page path, the "blob" scheme, the hostname, and the filename. In addition, when using an external domain as public path (my CDN), the path should not contain this hostname at all.
Apart from that, the code of the worker is running fine.
I am a bit confused about why this happens and where I should start to fix it. Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
Hi,
It could be that my issue is related to other issues I could check before on that repo, or similar ones related to webpack itself. But I can't get it solved so I am posting it here, sorry in advance.
So I build my workers in inline mode as recommended in the documentation because I want to be able to run them when my assets are hosted onto a CDN and therefore they cannot be executed after being downloaded from there. Here is my webpack config settings for worker files:
{ test: /\.worker\.js$/, loader: 'worker-loader', options: { inline: true } }
And here is how I import a worker into the module I use it:
import MyWorker from '../workers/my.worker.js';
That is pretty much it for workers. Now everything runs fine in development mode (using HMR). But in production mode, my browser complains that it cannot download the following file (note: I am visiting the page https://localhost:8000/page/1):
https://localhost:8000/page/blob:https://localhost:8000/dec34fdec4a74f63396c.worker.js.map
I see two problems here: obviously the path is wrong, somehow it is a concatenation of the current page path, the "blob" scheme, the hostname, and the filename. In addition, when using an external domain as public path (my CDN), the path should not contain this hostname at all.
Apart from that, the code of the worker is running fine.
I am a bit confused about why this happens and where I should start to fix it. Any help would be appreciated!
The text was updated successfully, but these errors were encountered: