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

Fails to download sourcemap file with inline mode #173

Closed
Tanguyabel opened this issue Dec 9, 2018 · 2 comments
Closed

Fails to download sourcemap file with inline mode #173

Tanguyabel opened this issue Dec 9, 2018 · 2 comments

Comments

@Tanguyabel
Copy link

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!

@piotrblasiak
Copy link

Making source maps work with inline workers would help me a lot as well.

@alexander-akait
Copy link
Member

Close in favor #245, source maps are broken we need fix it for all cases

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