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
[Vite] fileReplacements is not working for dev-server #13288
Comments
here's the other issue referencing it |
@mandarini It's a different issue I guess, I tried I actually have created a PR before |
@nodegin Did you ever find a solution for this? I am trying to swap out environment variables found in .ts file at build time in a Nx Vite app. |
@nodegin when I merged your PR, the fileReplacements stopped working for the vite builder, so I had to revert it. |
@goinnovise You can do the followings with latest version of
Which should be able to add configs for different envs. |
@nodegin Thanks for responding. This was the route I ended up going yesterday. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
fileReplacements is not working for dev-server (i.e. serve command)
Expected Behavior
When specifying the
fileReplacements
in the project.json and running with configuration, the file should also be replaced in local dev server, not just bundling production build.Github Repo
No response
Steps to Reproduce
fileReplacements
to the project.jsonNx Report
Failure Logs
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: