Syntax error on IE11 (or any browser without arrow-functions support)
See original GitHub issueExpected 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)
- Install Next.js
- Create a demo page
- Run
next dev
- Access application using IE11
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
Tech | Version |
---|---|
next | 4.1.4 |
node | 7.10.0 |
OS | any windows (tested on browserstack) |
browser | IE11 |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Why doesn't this arrow function work in IE 11? - Stack Overflow
You're using arrow functions. IE11 doesn't support them. Use function functions instead. Here's Babel's translation of that to ES5:
Read more >Syntax error on IE11 (or any browser without arrow-functions ...
IE11, for instance, throws a Syntax error when executing main.js . Steps to Reproduce (for bugs). Install Next.js; Create a demo page; Run ......
Read more >Arrow functions | Can I use... Support tables for HTML5, CSS3 ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Handling common JavaScript problems - MDN Web Docs
Arrow functions are supported across all modern browsers, except for IE. Declaring strict mode at the top of your JavaScript code causes it...
Read more >ie 11 umbraco backend login is white and show syntax error
If I look the error in ie it looks like is an arrow function but how do I avoid ... I know that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Pasting some lines of code related to the problem, so to make it appear on search in case anyone needs it:
node_modules/next/node_modules/strip-ansi/index.js:4
:node_modules/next/node_modules/ansi-regex/index.js:3
:@timneutkens what polyfills do I need for it to work on ie11?