fix(node-resolve): pass on isEntry flag and custom options#1016
Merged
shellscape merged 1 commit intomasterfrom Oct 19, 2021
Merged
fix(node-resolve): pass on isEntry flag and custom options#1016shellscape merged 1 commit intomasterfrom
shellscape merged 1 commit intomasterfrom
Conversation
3ff83fc to
27aa4e5
Compare
Member
Author
|
Thanks. Also fixed the package file so that only the |
Member
Author
|
Switching to "draft" as after some thought, I think I should also forward the "custom" option to "this.resolve". Will convert it back once I added this. |
9 tasks
27aa4e5 to
ed5b0ef
Compare
Member
Author
|
Done and again ready for review. |
ed5b0ef to
ab1de1f
Compare
9 tasks
| } | ||
|
|
||
| const resolved = await doResolveId(this, importee, importer, opts); | ||
| const resolved = await doResolveId(this, importee, importer, resolveOptions.custom); |
There was a problem hiding this comment.
This commit broke plugin-node-resolve, see: #1023
9 tasks
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.
Rollup Plugin Name:
node-resolveThis PR contains:
Are tests included?
Breaking Changes?
Event though I raised the rollup version used in tests, the plugin will work nicely with older Rollup versions that do not support the
isEntryflag. In this case,isEntry: undefinedwill be passed on as an option tothis.resolve, which in turn will be ignored when the flag is not supported.List any relevant issue numbers:
rollup/rollup#4230
Description
This makes sure the plugin correctly passes on the
isEntryflag introduced in recent Rollup versions to thethis.resolvecontext function as well as thecustomoption. This will allow plugins to rely on these to e.g. resolve entry points to proxy files or do any other conditional resolving.As noted above, this is purely a bugfix and should have no adverse effect when used with older Rollup versions.