Skip to content

fix(core): align create-nx-workspace style options with framework support - #36574

Open
ryanhefner wants to merge 3 commits into
nrwl:masterfrom
ryanhefner:fix/cnw-preset-style-options
Open

fix(core): align create-nx-workspace style options with framework support #36574
ryanhefner wants to merge 3 commits into
nrwl:masterfrom
ryanhefner:fix/cnw-preset-style-options

Conversation

@ryanhefner

Copy link
Copy Markdown

Current Behavior

create-nx-workspace offers 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:preset schema also restricts style to css and scss. This rejects valid framework-specific options—such as Angular's less—before the final application generator runs.

Expected Behavior

React and Next.js workspace prompts only offer their supported options:

  • CSS
  • SCSS
  • None

The Angular prompt offers:

  • CSS
  • SCSS
  • Sass
  • Less

The workspace preset treats style as pass-through data and leaves authoritative validation to the selected framework generator.

Regression tests cover the prompt choices, schema validation, and Angular less workspace generation.

Related Issue(s)

Fixes #36573

Testing

  • pnpm nx test create-nx-workspace
  • pnpm nx test workspace
  • pnpm nx run-many -t build,lint -p create-nx-workspace workspace
  • pnpm nx affected -t build,test,lint --base=origin/master
  • pnpm nx prepush

Affected e2e-local validation was attempted, but the local registry bootstrap could not run because Docker was unavailable and port 5000 was already occupied by macOS Control Center.

@ryanhefner
ryanhefner requested a review from a team as a code owner August 4, 2026 21:54
@ryanhefner
ryanhefner requested a review from JamesHenry August 4, 2026 21:54
@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 8c42299

@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 8c42299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create-nx-workspace offers unsupported stylesheet options for React and Next presets

1 participant