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

Figure out support for overriding default react plugin in Vite #2437

Open
infomiho opened this issue Jan 7, 2025 · 0 comments
Open

Figure out support for overriding default react plugin in Vite #2437

infomiho opened this issue Jan 7, 2025 · 0 comments
Labels

Comments

@infomiho
Copy link
Contributor

infomiho commented Jan 7, 2025

One of our users had the need to customize the way our react plugin works to use an i18n babel plugin: https://ptb.discord.com/channels/686873244791210014/812664118887841813/1325994905822302343

Initial thoughts on the topic:

In the case of the react plugin we went with we need to ensure it works approach and didn't really think about people want to swap out the react plugin. I guess this is not the case based on your needs.

In the current Wasp version, you can't use a custom react plugin. Maybe in the future we can do something about that:

  1. Enable you to provide a full custom vite.config.ts but then you'll need to replicate the options we already had - and continue to make sure that the config is up to date with latest internal Wasp changes.
  2. Enable you to override plugins completely, that is, to throw away Wasp's react plugin and use your own. Again, you'll need to then keep up with the internal changes Wasp does so your custom config matches.
  3. Make the user config the main config and you import Wasp custom stuff inside (e.g. from wasp/dev/vite) so you can manually modify some of the Wasp options e.g. kick out a plugin and replace it with your own.
@infomiho infomiho added the vite label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant