-
Notifications
You must be signed in to change notification settings - Fork 51
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
rspack "process not defined" error when trying to use process.env #361
Comments
https://www.rspack.dev/guide/language-support.html#node-polyfills |
I stumled upon the same problem. The env files are read properly, but the define plugin is missing. My workaround (the code must be added in the rspack.config file):
This will replace all process.env.NX_* variables in the frontend code. |
Currently the rspack plugin seems not to support
process
out of the box, so the normal configuration approach of .env files in Nx does not work.The text was updated successfully, but these errors were encountered: