-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Adding vite plugins with CJS build only will result in errors #10
Comments
Hi @lionelhorn! First of all thank you for reporting this issue and also providing all the details! The temporary file I quickly tested using The plugin also works when using it from As this framework uses the new Vite Environment API, the |
@lionelhorn a new version is available now on npm which should resolve this issue. To correct my statement above, For Vite specific configuration like adding plugins I would rather use |
@lazarv Thanks for the quick fix and the PR link. If using vite.config.ts, I assume I'll still start the dev process with the react-server cli. Wondering if it will display the usual vite console message
I actually started by adding plugins to vite.config.ts, but as nothing was displayed in the console regarding the inspect plugin. I assumed I did something wrong or it didn't work. |
It's understandable that it was not clear if it's worked or not. The framework is using Vite in middleware mode and Vite is not capable on it's own to print URLs where the server is listening on in this mode. Even when you have a |
This issue has been locked since it has been closed for more than 30 days. If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest version of @lazarv/react-server. If you have any other comments you should create a new discussion. |
Adding vite plugins following this guide :
https://react-server.dev/guide/framework/configuration
// react-server.config.ts
Will create what appears like a bundle (
react-server.config.ts.39a5aafe.mjs
) in/.react-server
using react-server.config.ts as an entrypoint.which will create an error if any plugin is or has deps with a CJS only build
Similarly to IndexXuan/vite-plugin-env-compatible#13
The text was updated successfully, but these errors were encountered: