feat: Allow project-owned vite plugin dep #537
Merged
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.
Problem
Currently, RedwoodSDK includes
@cloudflare/vite-plugin
itself in vite configuration. This make it difficult control which version of this plugin you are on or configure it a specific way.note: This is only a breaking change if you have
@cloudflare/vite-plugin
as a dependency in your own project.The new behaviour:
@cloudflare/vite-plugin
as its own dependency, RedwoodSDK will not instantiate@cloudflare/vite-plugin
itself in vite configuration@cloudflare/vite-plugin
as its own dependency (most likely case), RedwoodSDK will work as normal: will instantiate@cloudflare/vite-plugin
itself in vite configurationMigrating
The recommended approach is now to include
@cloudflare/vite-plugin
as a dependency in your project'spackage.json
:... then add the plugin to your
vite.config.ts
: