How to make IE 11 compatible with Next.js ? #13922
-
Hi guys, I'm using Next.js 9.4.0 for my project. I have tested it successfully in Chrome, Edge, Safari without any major issues. However, in IE11 I've got a Syntax error in Console as follows: To tackle this error, I've tried using the polyfill and babel as follows, but it didn't work: in .babelrc:
in package.json: (Dependency):
(devDependency):
And I imported following on top of my _app.tsx file:
I get this error in console when using localhost: Any idea or suggestion is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
This doesn’t appear to be an issue of polyfills, rather you have a node module that is not transpiled. Since IE11 cannot read ES6 syntax, you’ll need to transpile the node_module that is causing this issue. As far as what node_module it is, it is hard to say. You’ll have to do some trial and error testing to find it. There is a community plugin for this: https://github.com/martpie/next-transpile-modules |
Beta Was this translation helpful? Give feedback.
This doesn’t appear to be an issue of polyfills, rather you have a node module that is not transpiled. Since IE11 cannot read ES6 syntax, you’ll need to transpile the node_module that is causing this issue. As far as what node_module it is, it is hard to say. You’ll have to do some trial and error testing to find it.
There is a community plugin for this: https://github.com/martpie/next-transpile-modules