'Symbol' is undefined in IE11 with Next v5.1.0
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
App should work after upgrading to Next v5.1.0. in Next-js supported browsers.
Current Behavior
Noticed 'Symbol' is undefined
issue in IE11 after upgrading to Next v5.1.0. We don’t see this issue with Next v4.x.
Steps to Reproduce (for bugs)
- Upgrade app, which has for-of loop in its source code, to Nextv5.1.0.
- Open the application in IE 11 after build process and check the dev console.
Context
This is happening with Next v5.1.0.
Code generated for for-of
loop with Next v5.1.0
for (var g = l[Symbol.iterator](), w; !(h = (w = g.next()).done); h = true) {
}
Next v4.x version with same source code.
for (var h, g = (0,r.default)(l); !(y = (h = g.next()).done); y = !0) {
}
We can fix the issue by adding babel-polyfill
or babel runtime-transform
to our code but it would be consistent if we have a solution as part of Next build.
Your Environment
Tech | Version |
---|---|
next | 5.1.0 |
node | 8.11.1 |
OS | windows |
browser | IE 11 |
etc |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:7 (5 by maintainers)
Top Results From Across the Web
'Symbol' is undefined in IE11 with Next v5.1.0 #4187 - GitHub
Noticed 'Symbol' is undefined issue in IE11 after upgrading to Next v5.1.0. We don't see this issue with Next v4.x.
Read more >'Symbol' is undefined in IE 11 - javascript - Stack Overflow
Symbols are a new javascript concept that aren't supported in IE11. http://kangax.github.io/compat-table/es6/#test-Symbol.
Read more >Releases - styled-components
Implement shouldForwardProp API for native and primitive platforms, which was previously missing in [v5.1.0] (see #3093) This has been released under a ...
Read more >HTML Standard
2.1.1 Parallelism; 2.1.2 Resources; 2.1.3 XML compatibility; 2.1.4 DOM trees; 2.1.5 Scripting; 2.1.6 Plugins; 2.1.7 Character encodings; 2.1.8 Conformance ...
Read more >KeyboardEvent.keyCode - Web APIs - MDN Web Docs
Use a keyCode value for an ASCII character produced by a key which is mapped to the same virtual keycode of Windows when...
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
@matejkonrad can you provide a full reproduction? I assume it’s because you have a module in node_modules that uses
Symbol
This is an issue for me on Next 7.0.2 on IE11, Windows 10 (using browserstack)