We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
process
The text was updated successfully, but these errors were encountered:
https://www.rspack.dev/guide/language-support.html#node-polyfills
Sorry, something went wrong.
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):
const defines = {} Object.keys(process.env).forEach(function(key) { if(key.startsWith("NX_")) { defines['process.env.' + key] = JSON.stringify(process.env[key]) } }); config.plugins.push(new rspack.DefinePlugin(defines))
This will replace all process.env.NX_* variables in the frontend code.
No branches or pull requests
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: