-
Notifications
You must be signed in to change notification settings - Fork 87
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
Fails to load in IE11 due to ES6 syntax #296
Comments
You have to use webpack or something like it to adjust the code to the platforms you need to support. There is no one right answer here. |
@hueniverse we are experiencing the same error after updating from nes 7.0.3 to @hapi/nes 11.2.2 together with updating hapi from 18.1.0 to @hapi/hapi 18.4.0 and inert from 5.1.0 to @hapi/inert 5.2.2. Do you have any idea why this could be happening now after the update? |
I was able to get around this by adding Packages installed
babel.config.js
Added this to my
|
@iancamp thank you. We have a similar setup, except that we do not use I think I now proceeded some steps by adding
I am wondering whether adding |
Oh, didn't realize |
Support plan
Context
What are you trying to achieve or the steps to reproduce?
What was the result you got?
Syntax error in vendor.js due to line 30 of client.js containing an arrow function.
What result did you expect?
The page to load correctly and for Nes to successfully connect / send requests to the server.
--
Replacing all arrow functions with
function (...) {...}
and shorthand style properties withprop: prop
in JSON objects results in the page loading correctly. However, due to change in scope when usingfunction(...)
,this
is incorrectly used in most cases and results in an error when callingsocket.connect()
. I stopped short of adding an outervar _this = this;
variable and updating references since I'm not sure if that's the preferred solution.The text was updated successfully, but these errors were encountered: