fix(core): align create-nx-workspace style options with framework support - #36574
Open
ryanhefner wants to merge 3 commits into
Open
fix(core): align create-nx-workspace style options with framework support #36574ryanhefner wants to merge 3 commits into
ryanhefner wants to merge 3 commits into
Conversation
👷 Deploy request for nx-docs pending review.Visit the deploys page to approve it
|
👷 Deploy request for nx-dev pending review.Visit the deploys page to approve it
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
create-nx-workspaceoffers stylesheet options for React and Next.js that their application generators do not support, including Emotion, styled-components, styled-jsx, and Less.The intermediate
@nx/workspace:presetschema also restrictsstyletocssandscss. This rejects valid framework-specific options—such as Angular'sless—before the final application generator runs.Expected Behavior
React and Next.js workspace prompts only offer their supported options:
The Angular prompt offers:
The workspace preset treats
styleas pass-through data and leaves authoritative validation to the selected framework generator.Regression tests cover the prompt choices, schema validation, and Angular
lessworkspace generation.Related Issue(s)
Fixes #36573
Testing
pnpm nx test create-nx-workspacepnpm nx test workspacepnpm nx run-many -t build,lint -p create-nx-workspace workspacepnpm nx affected -t build,test,lint --base=origin/masterpnpm nx prepushAffected
e2e-localvalidation was attempted, but the local registry bootstrap could not run because Docker was unavailable and port 5000 was already occupied by macOS Control Center.