commit 08883cbdd1c39a0c15b97af44ddaefe14acdc21a broke discourse rendering on older gecko releases. Gecko doesn’t support optional chaining operator before version 74.
Might be wrong on this, but initial guess is that we don’t define browser list and it’s using some default (probably @babel/preset-env · Babel) and doesn’t consider this version as something we support and as a result is not transpiled.
It’s weird though firefox 74 is only one year old, but yes looking at browserlist currently:
Now, the question is, @sam do we want to support this? Altough it’s only one year old, current fx version is 89, so this is 15 versions behind. Not sure about this your call. It’s important to consider that to support this it will add weight to everyone’s payload as transpilling basically works more or less like a polyfill (adding some functions tu support this and replace the syntax by functions calls).
There are lot of reasons, but mostly it makes everything easier for dev, we don’t have to think too much about all the things we can use or not, and have a rather modern base.
I am open to dropping support provided our html fallback is in place.
What we can certainly not do is show a working static page to ie9 and a broken page to 1 year old Firefox.
I prefer to just transpile up to say 2-3 year old Firefox / Chrome, but am happy to leave that call to @eviltrout and you, we can go more aggressive I guess, but we can not display broken pages
Edit, see backlink, this can be a pretty serious issue on android that tends to have terrible cadence upgrading browsers
I can’t reproduce the OP on meta. I tried via Browserstack using Firefox 73 on macOS and Firefox 68 on Windows. @vige can you repro the problem on meta?
Ok correct if i’m wrong @pmusaraj but I think that as we don’t set preset-env and as a result don’t define targets, every plugins we include are used. As a result proposal-optional-chaining is getting applied for sure.
I think I’m ok with this, we maybe just need to check every year each plugin and reconsider if still needed?
Thank you so much to all involved developers for fixing this so quickly!
For the record, according to my testing, this bug was also affecting, in some instances, the latest version of Microsoft Edge for Android (which, AFAIK, does not run Gecko).
Could you be so kind to add the actual v2.7.4 tag to that release?
I just spent half an hour trying to git checkout v2.7.4 which turned out not to exist