Using user's vite.config.ts as entry point POC
#3459
Draft
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.
Description
This is POC of one of the approaches to give more control over Vite to the user. Not a real PR that needs to be reviewed and merged. This PR will be deleted afterwards.
What's in the POC
web-appto use the user's config directly (this means user's config is the real config butweb-appis still the entry point, we are still a framework)viteCLI is invoked with../../../vite.config.tsflagweb-app'svite.config.tsno longer imports user's config and merges with Wasp's configwasp()plugin which contains all the important optionsreact()plugin etc.) to thewasp()pluginreact()plugintestoptions for Vitest to ignore.wasp/**/*if Vitest is used from user-landwasp/client/viteand use in thevite.config.ts:wasp test clientcommandkitchen-sink, not sure what would be the best way to ship these helpers, as part of the docs?)Part of #3135 #3472