-
-
Notifications
You must be signed in to change notification settings - Fork 276
Compatibility with webpack-dev-server HMR. #174
Comments
I'm also experiencing this issue. |
jFYI - a workaround has been recommended on the Webpack side here. |
'm also experiencing this issue |
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js'
publicPath: 'http://localhost:3000',
globalObject: 'this'
}, |
Somebody can create minimum reproducible test repo? |
@evilebottnawi I don't know if it's very minimal but I used create-react-app to make a simple example. https://github.com/kumar303/worker-loader-issue174 The readme has instructions. The app gives me: If I understand correctly, I can change the webpack config to transform |
@kumar303 it is happens only with webpack-dev-server? |
yes, I think so. In create-react-app, |
@kumar303 if is happens only with webpack-dev-server, can you create issue in webpack-dev-server repo with reproducible test repo (no need minimum, just step how to reproduce problem) |
The title is misleading but this issue already exists in webpack-dev-server; it seems to be about the same exact problem: webpack/webpack-dev-server#1595 |
@kumar303 i think we should solve this instead exclude some files from HMR, because it is not good solution |
Can you put example with reproachable steps in issue? |
I've been fighting with this issue for a few days. I can't seem to include pdfjs within create react app. See wojtekmaj/react-pdf#190 developit/workerize-loader#5 and facebook/create-react-app#1574 None of their solutions solve my issue but I'd really love to see this solved. |
I will look this on weekend |
Hi there 👋 This is my solution to disable HMR for workers: |
Fixed in the master, ETA is the end of week, big sorry for delay |
Uh oh!
There was an error while loading. Please reload this page.
The error is coming from the web worker because
window
is not available on web workers.Turning off HMR will fix the error BUT I want to be able to use HMR for other stuff. Is there anything that the loader could do about this?
webpack/webpack-dev-server#1595
The text was updated successfully, but these errors were encountered: