fridays / next-routes

Universal dynamic routes for Next.js
MIT License
2.47k stars 230 forks source link

ie 11 error #27

Closed philipheinser closed 7 years ago

philipheinser commented 7 years ago

We get the following error in ie 11 object doesn't support this property or method find. We only use nextjs and next-routes. Maybe we need to chnage your babel Settings? https://github.com/zeit/next.js/issues/473

HaNdTriX commented 7 years ago

Lets wait for https://github.com/zeit/next.js/pull/1808 than these kinds of problems will be solved by babel-preset-env.

Example .babelrc

{
  "presets": [
    ["next/babel", {
      "targets": {
         "browsers": ["last 2 versions", "safari >= 7"],
         "node": true
      }
    }]
  ]
}
sfrieson-tm commented 7 years ago

It seems next.js is polyfilling Object.assign now, but i'm still getting the error in IE11. I'm pretty sure the call is coming from next-routes.

sfrieson-tm commented 7 years ago

I have now added Polyfill.io which claims to support polyfilling the find method, but I am still getting the error and when I look at the source, it seems to be coming from the findByName method definition.

This is currently breaking my IE11 version. Could you please review or suggest other steps I could take.

Polyfill.io's tests: image

HaNdTriX commented 7 years ago

https://github.com/fridays/next-routes/pull/37