nx-extensions
nx-extensions copied to clipboard
fix(vite): correct fileReplacements property names
function replaceFiles expects input of type { file: string; with: string } but current schema declares { replace: string; with: string }
Nx Cloud Report
CI is running for commit 9fc778a5f6f34381e41d4224bd960e6f104c6ac5.
📂 Click to track the progress, see the status, the terminal output, and the build insights.
Sent with 💌 from NxCloud.
I've also run into this issue with file replacement. Was just about to open an issue on this, but noticed there's already a PR to fix! Are there plans to merge/release this change in the future?
@DominikPieper I was thinking vite and NX now support just environmental vars. Should we follow in same direction?
Just ran into this myself. Great it is being fixed!
However, it seems to me the convention of @nrwl packages is to use replace in stead of file. So perhaps it is better to keep the schema and change the argument name of the replace plugin?
@DominikPieper I was thinking vite and NX now support just environmental vars. Should we follow in same direction?
I actually use this feature to either inject a mock backend or a real backend depending on config. I could make the switch based on an environment var but that would mean some more complex logic as I do not want to package the mock backend, which includes faker into the production bundle. With file replacements I do not have to worry about that.
Removing functionality in support of NX, Thank you @iruszpel for this PR though, its much appreciated