You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I have an issue with IE11 because it doesn't support sticky 'y' RegExp flag.
The last release of core-js polyfilled sticky flag, but it works if we use the constructor for creating RegExp expression. For instance:
//worked example in IE11
new RegExp(/\d/, 'y')
//not worked example in IE11
/\d/y
We don't use wepback, so we can't use babel in our stack, thus we can't use any babel transpiler.
Tell me please is it possible to migrate fluent.js from literal RegExp expression to constructor?
I can create PR for this change if you don't mind.
Thanks!
P.S. I know fluent.js officially doesn't support IE11
The text was updated successfully, but these errors were encountered:
I'm torn on the issue itself. From my experience there's no such thing as partially supporting a browser; it's either we support it, or we explicitly don't support it. It's true the in this particular case we could replace all regex literals with constructors, and the code could work in IE11. But without a change in the browser support matrix and the official fluent.js-wide policy, the risk of using another incompatible JS feature in the future would be significant. That's why I'm leaning against making this particular change to our codebase at this time. @Pike, do you have more thoughts on this?
I think that the proper solution to use-cases like yours is to document a build setup which allows users of fluent.js to produce their custom compat builds. I'd be more than willing to help kick start such documentation.
In any case, it would be best to wait a couple of weeks before moving forward. I'm almost done with porting @fluent/bundle to TypeScript (#436); I expect to land it early next week. I also filed #435 about a larger attempt to redefine our compatibility strategy.
Hi guys, I have an issue with IE11 because it doesn't support sticky 'y' RegExp flag.
The last release of
core-js
polyfilled sticky flag, but it works if we use the constructor for creating RegExp expression. For instance:We don't use
wepback
, so we can't usebabel
in our stack, thus we can't use anybabel transpiler
.Tell me please is it possible to migrate
fluent.js
from literal RegExp expression to constructor?I can create PR for this change if you don't mind.
Thanks!
P.S. I know
fluent.js
officially doesn't support IE11The text was updated successfully, but these errors were encountered: