Add support for ignoring native browserslist resolution#585
Open
apancutt wants to merge 1 commit intoamilajack:mainfrom
Open
Add support for ignoring native browserslist resolution#585apancutt wants to merge 1 commit intoamilajack:mainfrom
apancutt wants to merge 1 commit intoamilajack:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #411
Consider a scenario where a project contains code destined for NodeJS except for the
srcdirectory which is for browsers. The project has the following browserslist config:We want
compat/compatto use the "node" env for everything except thesrcdirectory, and "production" (browserslist default env) withinsrc. This is currently not possible since additional targets are always merged with browserslist-resolved targets (when config is present).This change adds support for a new options structure (with full BC):
Setting
ignoreBrowserslistTargets: truewill prevent merging targets provided inquerywith the ones resolved by browserslist.We can now do something like this:
The targets defined in the "node" browserslist environment will now be used everywhere in the project except within the
srcdirectory where the "production" environment will be used instead.