-
-
Notifications
You must be signed in to change notification settings - Fork 383
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" is not defined error on server side generated entry file #276
Comments
How did you solve it? |
This did the trick for me:
|
What's the magic behind I am receiving the error |
Were you able to solve this?? I am getting the same error but my use case is different.. |
This solution worked for me. Thanks 🤩 |
⨯ ReferenceError: self is not defined Iam getting this error |
💬 Questions and Help
Loadable Components project is young, but please before asking your question:
YES
YES
After you can submit your question and we will be happy to help you!
Hello,
Thanks for the SSR example, I followed the example, the differences from the SSR example vs mine are:
webpack-dev-middle
forexpress
, I'm usingwebpack-dev-server
webpack-dev-server
from Nodejs API, I'm runningwebpack-dev-server
from command line forhapi
, and added thewriteToDisk
option todevServer
.Now on server side when it calls
which tries to require server side entry file -
dist/js/node/main.bundle.dev.js
, I'm getting error onwindow is not defined
:The error seems to come from webpack-dev-server referencing
self
: https://github.com/webpack/webpack-dev-server/blob/2f7f05276e10a2ce408e0903982b8bbe07699182/client-src/default/index.js#L46Tried as suggest here - markdalgleish/static-site-generator-webpack-plugin#130 with
or
even disabling HMR, none works.
Any idea how to resolve this? Appreciate your help!
Thanks
The text was updated successfully, but these errors were encountered: