Skip to content

Next.js-Vite: Fix failing postcss mutation#33879

Merged
valentinpalkovic merged 1 commit intonextfrom
valentin/fix-nextjs-15
Feb 20, 2026
Merged

Next.js-Vite: Fix failing postcss mutation#33879
valentinpalkovic merged 1 commit intonextfrom
valentin/fix-nextjs-15

Conversation

@valentinpalkovic
Copy link
Copy Markdown
Contributor

@valentinpalkovic valentinpalkovic commented Feb 20, 2026

Closes #

What I did

Fixed an issue where some vite config options, such as root, were not defined inline, but provided via plugins, which led to a late resolution, and other plugins, like the nextjs-vite ones, were not able to read config.root in time.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Chores
    • Optimized internal build configuration management for improved maintainability.

@valentinpalkovic valentinpalkovic self-assigned this Feb 20, 2026
@valentinpalkovic valentinpalkovic added bug ci:daily Run the CI jobs that normally run in the daily job. labels Feb 20, 2026
@valentinpalkovic valentinpalkovic moved this to In Progress in Core Team Projects Feb 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Fails
🚫 The "#### Manual testing" section must be filled in. Please describe how to test the changes you've made, step by step, so that reviewers can confirm your PR works as intended.

Generated by 🚫 dangerJS against a083a04

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Feb 20, 2026

View your CI Pipeline Execution ↗ for commit a083a04

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ❌ Failed 19m 56s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-20 10:09:15 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Configuration settings (root, base, cacheDir) are centralized in the common Vite InlineConfig (sbConfig) instead of being returned from a builder-vite specific plugin. The projectRoot variable is no longer needed, and the plugin configuration is simplified.

Changes

Cohort / File(s) Summary
Vite Configuration Refactoring
code/builders/builder-vite/src/vite-config.ts
Moved root, base, and cacheDir configuration from a plugin-specific block to the top-level sbConfig in common configuration, eliminating the projectRoot variable and consolidating configuration logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)

Comment @coderabbitai help to get the list of available commands and usage tips.

@valentinpalkovic valentinpalkovic changed the title Next.js: Fix failing postcss mutation Next.js-Vite: Fix failing postcss mutation Feb 20, 2026
@valentinpalkovic valentinpalkovic merged commit 512098b into next Feb 20, 2026
296 of 314 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/fix-nextjs-15 branch February 20, 2026 11:02
@github-project-automation github-project-automation bot moved this from In Progress to Done in Core Team Projects Feb 20, 2026
@github-actions github-actions bot mentioned this pull request Feb 20, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug ci:daily Run the CI jobs that normally run in the daily job. nextjs

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants