allow for optional relative resolve for non-standard extensions #428
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.
This looks to resolve #201 which is a continuation of a couple open PRs: #259 and #317.
The feedback I see in those PRs seems to be that this is for a "non-standard" use case and the effect of putting relative path resolution in the "standard path" could be detrimental to the vast majority of use cases.
For this PR I've opted to make the relative resolution strategy an opt-in. Therefore, if you were looking to replicate the react-native extension behaviour, you'd have the following config:
or some variation. I'd note that this behaviour is becoming standard with the
.web.js
and.native.js
extensions that are proliferating in react-land. I needed this forreact-redux
for example, which uses this to select the right batch method.