You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a new remote project with a multi-word name using the Nx CLI (as the --name argument), regardless of the notation used (camelCase, underscore, or dot notation), Nx generates a hyphenated name, leading to a validation conflict.
nx g @nx/react:remote --name=myRemote --directory="apps/myRemote" --dynamic=true
NX Generating @nx/react:remote
✔ Which stylesheet format would you like to use? · none
✔ Which E2E test runner would you like to use? · none
✔ Which bundler do you want to use to build the application? · webpack
✔ What should be the project name and where should it be generated? · myRemote @ apps/myRemote
NX Invalid remote name provided: my-remote. The name can only contain letters, digits, underscores, and dollar signs.
Expected Behavior
The Nx CLI should correctly handle multi-word names for remote projects, generating valid names regardless of the notation used.
GitHub Repo
No response
Steps to Reproduce
Install the latest Nx CLI using npm install -g nx
Generate a new workspace with npx create-nx-workspace@latest
Attempt to generate a new 'remote' project with a multi-word name, like so: nx g @nx/react:remote --name=myRemote --directory="apps/myRemote" --dynamic=true
…27901 (#27990)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->
<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->
<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->
## Current Behavior
<!-- This is the behavior we have today -->
React Module Federation generators were normalizing names and using them
incorrectly
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The host and remote generators should always use the name provided by
the determineProjectNameAndRootOpitons
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Fixes#27901
Current Behavior
When creating a new remote project with a multi-word name using the Nx CLI (as the --name argument), regardless of the notation used (camelCase, underscore, or dot notation), Nx generates a hyphenated name, leading to a validation conflict.
Expected Behavior
The Nx CLI should correctly handle multi-word names for remote projects, generating valid names regardless of the notation used.
GitHub Repo
No response
Steps to Reproduce
npm install -g nx
npx create-nx-workspace@latest
nx g @nx/react:remote --name=myRemote --directory="apps/myRemote" --dynamic=true
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: