fix: add compatibility with Vite Environment API promoted to v8 #171
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 #170
Description
Currently, in code the flag that's being checked is
unstable_viteEnvironmentApi, however in one of recent RR updates it got promoted tov8_viteEnvironmentApi. This made it mandatory to rename the field in config when upgrading version, which caused the plugin to not work properly. This PR fixes this, while still providing compatibility with the previous version.Type of change
Please mark relevant options with an
xin the brackets.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration
I patched the version locally to make sure that's what causing issues with deploy and then decided to upstream the fix 😄
Reviewer checklist
Mark everything that needs to be checked before merging the PR.
Screenshots (if appropriate):
Questions (if appropriate):