Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(run): use resolved input if file exists #336

Closed
wants to merge 2 commits into from

Conversation

autarc
Copy link

@autarc autarc commented Apr 25, 2020

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 Name: run

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

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 the input entry point. As the virtual plugin allows to specify inline scripts instead of real paths the matching is currently failing. To solve the issue its initially checked if the input 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.

@autarc autarc changed the title Feat/check run actual input path feat(run): use resolved input if file exists Apr 25, 2020
@shellscape
Copy link
Collaborator

Thanks for the PR, but I'm a bit confused. You're referencing an unknown plugin named "build," but we don't have any plugins named that here. Did you mean the run plugin?

It looks like this is dependent on #335, so we'll put a hold label on this until that one is resolved.

@autarc
Copy link
Author

autarc commented Apr 26, 2020

@shellscape Yeah sorry for the confusion. As you said the run plugin was meant so I've updated it in the header. It clearly depends on #335 so it is certainly better on hold until we know how to proceeded there. Perhaps the change in this PR might afterwards be even redundant. Just though pushing it for feedback might be an idea since I already had it locally working.

@shellscape
Copy link
Collaborator

Totally, thanks for clarifying. We'll tackle this once #335 is resolved.

@shellscape
Copy link
Collaborator

Closing as abandoned as it depends on #335 which was closed as abandoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants