Target browser (browserslist) #1297
Replies: 3 comments 7 replies
-
So, here's what I have in mind about it:
That being said:
|
Beta Was this translation helpful? Give feedback.
-
Did some more research and browserslist uses We should go the same route and generate our own data from |
Beta Was this translation helpful? Give feedback.
-
Locking this as there doesn't seem to be a close feature for discussions and |
Beta Was this translation helpful? Give feedback.
-
css-prefix
uses browser specific prefixes, unfortunately rome doesn't have an actual target browser implementation yet.So;
How should we format a browser?
In a similar way to browserslist in a string
"firefox 84"
or an object with a browser and version property{browser: "firefox", version: 84}
.We probably should support browser list from both
package.json
and rome's config.Internally it should be an array of whatever kind of format we chose. This would be cached someway so that repeated calls with the same target don't affect performance.
browserslist("last 2 versions")
Personally I prefer the object format.
As for the match function we could either check if an array contains another array of browsers or have a more complex design that also accepts an operator (
before
,after
).I think comparing two arrays would be simpler.
We shouldn't support IE as it's pretty much deprecated.
The easiest way to store all existing browser version would probably just be an array of possible versions per browser. Although it would require us to update it on each browser release.
Any feedback is welcomed!
Beta Was this translation helpful? Give feedback.
All reactions