Polyfilling Object.fromEntries()?

Today, a customer showed me, that my Meteor application does not work in her browsers. She used Firefox 60.0 and Safari 12.0.

The reason was the missing support for Object.fromEntries. After updating Firefox she could use the application. The App Store does not provide an update for Safari, so this browser cannot be used for the application.

Until now, I’ve never had any problem using modern JavaScript features within Meteor. Meteor took care of it and provided the necessary transpilations and polyfills.

As it is an internally used application, I could leave it as it is. But for a customer facing application, I’d see this as a big issue.

Should this be considered as bug? Then, I’d create an issue on Github.

Is there a list of supported browsers? This list from MeteorPedia would cover the versions specified above.

Do I have to change some Babel related settings to cover these browser versions? How should I do that?

The application uses Meteor 1.8.1. It runs on the server as built with meteor build

Thanks for your advice!

Yes this is a bug, Meteor should support all browsers without configuration.
Sounds like a bug with the new-ish differential compiling feature detection.

You can try manually setting the boundary between legacy and modern with:

import { setMinimumBrowserVersions} from 'meteor/modern-browsers'
setMinimumBrowserVersions({
  firefox: 60,
  safari: 12,
}, 'Object.fromEntries')

The first argument being the minimum versions for modern, the second is just a label to help keep track of why a version is required

1 Like

Thanks for explanation and providing a quick fix.

I’ll issue a bug report on Github.

1 Like