-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self.postMessage is not a function under webpack-dev-server #792
Comments
Related to #745 |
Should be resolved in #813 and v2.7.1. If it's not, please ping me and we'll reopen. |
Hi @shellscape, I still have the error in v2.7.1. Do you have any tips how to fix this? Let me know if you need more info about the error. |
Unfortunately I don't. We've had a few PRs related to this and I'm unable to reproduce the issue in any of our tests. If this is still occurring there's a better than average chance that it's your configuration or environment causing it. Sidenote: If you're not on webpack@3 yet, it's time to upgrade. |
Ok thank you, I'll try to debug it some more, maybe I find something. Btw I am using the newest webpack already. |
I also had this exact issue in my angular 4 app today I hope this helps. |
Sorry for bringing this thread back to life, but I've been dealing with this problem for a few days now on Webpack 3, and think I've narrowed it down to at least one possible solution for anyone having problems. In my Vue project I was submitting Ajax requests from a component. In order to maintain access to update data tied to No errors were presented on compilation since |
@DustinArmstrong that may be something the main webpack project can assist with - perhaps a console warning or some such. |
I have also this problem, I don't know how to do ... |
Do you have set |
just don't use self, use |
If you want to use |
I have same issue, I fixed it with finding |
You are a genius. |
…hot module replacement (HMR). webpack/webpack-dev-server#792 (comment)
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
![screen shot 2017-02-16 at 6 27 48 pm](https://cloud.githubusercontent.com/assets/10135897/23050226/d1477524-f475-11e6-9264-f494500d244d.png)
![screen shot 2017-02-16 at 6 27 56 pm](https://cloud.githubusercontent.com/assets/10135897/23050229/d4b86e5c-f475-11e6-9183-2073a45b443c.png)
Self is referring to a wrong object
serviceworkerglobalscope
instead ofwindow
.PostMessage is not defined under
serviceworkerglobalscope
If the current behavior is a bug, please provide the steps to reproduce.
Clone https://github.com/didi0613/electrode/tree/webpack-2.0
checkout branch webpack-2.0
npm i && npm run bootstrap
goto samples/universal-react-node app
npm install
gulp dev
What is the expected behavior?
There should be no error and pwa should work
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention your webpack and Operating System version.
webpack 2.2.0
wepack-dev-server 2.2.0
os: mac
The text was updated successfully, but these errors were encountered: