feat(run): use resolved input if file exists #336
Closed
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.
NOTE
This PR is is based on #335 as changes there are connected with this use case. It will be rebased as there are updates and also [refer then in the test to the
@rollup/plugin-virtual
module rather than the relative path.The modified files are:
@rollup/plugin-virtual
)@rollup/plugin-virtual
)@rollup/plugin-virtual
)Rollup Plugin Name:
run
This PR contains:
Are tests included?
Breaking Changes?
Description
The
run
plugin allows to run a bundle directly after its output is written to the disk. For figuring out the correct entry filename it uses theinput
entry point. As thevirtual
plugin allows to specify inline scripts instead of real paths the matching is currently failing. To solve the issue its initially checked if theinput
entry is pointing to an existing file, otherwise the value is taken as is.Along with the update of the
virtual
plugin in #335 this allows to successfully run the output of bundles initiated through virtual files.