-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
Syntax error on IE11 (or any browser without arrow-functions support) #3330
Comments
Pasting some lines of code related to the problem, so to make it appear on search in case anyone needs it:
|
having the same issue, how did you solve it? |
@Jinnified it's fine in production cause the dependency isn't added there. We'll have to transpile it in dev though. |
@Jinnified I didn't really sove it, but for testing locally I'm building the app with |
hi, @timneutkens , i am not sure it's only under dev mode, it occurs to me both on dev and production, however, if I either use yarn to start sever with resolutions
or as you mentioned in another related post, i upgrade next version to canary, then this issue would be gone in IE11. BUT, in IE 10 or below, there is another error would break the script, something like Set can not be found or something. |
@Jinnified the fix is only released under
you're required to load your own polyfills for IE 10 and below 🙂 |
@timneutkens what polyfills do I need for it to work on ie11? |
It'd be great to see an IE polyfill as a next-plugin one day! I'm thinking of rewriting one existing PHP website with Next.js and the ambiguity of IE support reduces my enthusiasm a bit 😅 . There are still customers using IE11 (and even IE10, 9 and 8 😱), so it be great to see a summary of what Next.js can offer to these people. Even when we're talking about <5% of the website audience overall, absolute numbers of visits can be still big and the profits those people generate can be also considerable (thankfully, not in my case 😃). |
There is support for - at least as I checked - IE11 @kachkaev but only for testing you have to do a build and use that ( |
Next.js by itself runs fine in ie11 now, only node_modules can cause the arrow function I'm not sure about IE10/9/8, but those generally require polyfills. I'd be happy to take in a pull-request to next-plugins to make poly filling easier / automatic. |
Expected Behavior
It should be possible to access the application with older browsers when running
next dev
.Current Behavior
IE11, for instance, throws a Syntax error when executing
main.js
.Steps to Reproduce (for bugs)
next dev
I've setup a repo to reproduce the bug: https://github.com/lucasconstantino/next-ie11-syntax-error
Context
I'm having a hard time testing my application on IE11 locally.
Your Environment
The text was updated successfully, but these errors were encountered: