Add support for "outputs" for target's configuration #31539
TomasChmelik
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In my usecase I have a "build" target which has "dev", "test" and "prod" configurations. Each configuration specifies different value for environment variable. This variable is then read in vite.config.ts to configure where outputs will be put. If this env variable isn't defined, the "prod" is used as a fallback.
Problem is that each configuration has different output folder (based on that environment variable) because they could be built at the same time and they definitely have different content.
This means when Nx reads config of "build" target from vite.config.ts, it assumes the only output of this target is the "prod" output folder.
I can't use
{options:foo}
in the outputs path because this new option is not accepted by vite.I suggest two possible solutions:
{configuration}
variable in the outputs paths. Not ideal since configuration name might not match the folder name, but at least better than nothing.Beta Was this translation helpful? Give feedback.
All reactions