-
-
Notifications
You must be signed in to change notification settings - Fork 158
Question: Supports browserslist
config on package.json?
#149
Comments
@amilajack Yes! I'm going to implement this tomorrow! |
🎉🎉🎉 Would play very nicely with eslint-plugin-compat |
@yavorsky why you don’t want to use default browsers set if browsers was not specified? Browserslist default is a good set. Also using default set is a Autoprefixer behaviour right now. We need to change it too if there is some problem with it. |
@ai the idea is to use babel-preset-env without any options like babel-preset-latest. It must be easy to switch from latest preset or just 2015 to env without risks and losses. Also, users need to remember the set of default browsers to know what they actually support. |
@yavorsky OK, I understand logic. But sad that in result Autoprefixer and Also in my experience users should not set browsers. Most of users make a mistake in setting browsers. A lot of users will set This is why main way to use Autoprefixer is to no set browsers. Because default browsers is better for most of users. What do you think about it? Maybe |
@ai Yes, I like simplicity too and this preset is a good intention. As autoprefixer/browserslist of course.
Attempt to simplify could cause complication. The default list is a real list of all items we must know about. Need to think more about it 🙃 |
This and the rest of the issues @yavorsky mentions above are valid. (Especially since we seem to have received a healthy mix of issues from both node and browser users 😜) Seems like mimicking autoprefixer's default browser behavior would only work if we had some sort of clear signal that the user is targeting browser(s)? And if they're giving us some flag, it winds up not being much more work to go ahead and set their targets? |
@yavorsky Default browsers query:
Note, that we force users to not focused on direct versions in browsers (like This list is result of long discussion in Autoprefixer. Default browsers query could be changed. We change it few times. But because it based on dynamic queries, we really don’t need to change it often. |
@yavorsky Also we could add some We could add |
@ai You could be more persistent. 😄 Yes, it's interesting! But it isn't resolve 3 and 4 issues. It brokes the idea that preset-env without configuration is preset-latest anyway. I really like to see more thoughts on this issue. We could implement it in 5 minutes, but then all days long resolve issues mentioned in option 4. |
@yavorsky :D I am at Sri Lanka right now :D I agree that But let’s think for some solution to fix both our problems:
|
Off topic: I'm Sri Lankan! 😂 |
Hello. |
@yavorsky what workaround we have foe this? Maybe we should add |
@ai @exarus Sorry for the delay.
So,
I really want to see more ideas to get configuration as simple as possible and not contradict browserslist config. |
I think |
@yavorsky Thank you for explanation.
As for me, the empty array is associated with no target browsers by a reader of |
In Autoprefixer if you specify |
We've added 2.0 milestone, so it will be published with babel-preset-env 2.0 and we have some time to decide what API would be the best. Thanks for helping with it 😊 |
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(149,5): Error : [Browserslist] Could not parse E:\Visual Studio 2015 # I have the above Error in which I am unable to publish to azruewebsites.net the local build and test are okay. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(149,5): Error : [Browserslist] Could not parse E:\Visual Studio 2015\Projects\ParadiseClumberSpaniel\package.json. Ignoring it. Anyone have an idea on what is wrong? |
Hi ! Any news about this? Thanks 😄 |
Any follow up for this? |
Yeah it would be great with |
Will need to reconcile when babel-preset-env detects natively See: babel/babel-preset-env#149 Upgrades postcss-loader
Any news on this? |
Very unfortunate that this actually trivial change is not being implemented. I am currently using a workaround in our centralized Babel preset builder which uses the fact that browserslist itself offers the lookup behavior when passing What I do is actually importing 'browserslist' on my own and executing it with a first parameter of I would vote for |
Any news on this? |
If I'm not mistaken, this has already been implemented in #161 and it's available in the 2.x-beta. |
@swernerx @vladimirvolek babel-preset-env@2+ already supports all of this. |
Yep, closing this. |
Does this plugin allow using the
browserslist
property in the package.json?The text was updated successfully, but these errors were encountered: