Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandboxes: Pin @vitejs/plugin-react to avoid conflict #22501

Merged
merged 2 commits into from
May 10, 2023

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented May 10, 2023

Closes #22454
Closes #22294

What I did

This fixes the issue that is currently preventing contributors from being able to create vite-react sandboxes without --no-link. The problem is that we use @vitejs/plugin-react@3 in @storybook/react-vite, but new vite projects are created in the sandboxes using the latest version 4.

This addresses the problem by adding a resolutions in the sandbox that pins the version to ^4.0.0. We don't use the backup version supplied in react-vite, so this does not have any impact on how we use the sandbox, and it doesn't impact everyday Storybook users either.

How to test

Run yarn task --task sandbox --template react-vite/default-ts --start-from install, it should succeed.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

Copy link
Contributor

@chakAs3 chakAs3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is working on my local and not affecting end users.I had just to merge this PR #22449 first cause NX breaking on my drawin-x64 macbook .

i tested also @yannbf PR bu it is still breaking. i will go ahead and merge this to unblock some contributors thanks @IanVS for your solution

@chakAs3 chakAs3 self-assigned this May 10, 2023
@chakAs3 chakAs3 merged commit 2d87152 into next May 10, 2023
@chakAs3 chakAs3 deleted the build/vite-react-plugin-conflict branch May 10, 2023 22:15
@shilman shilman added build Internal-facing build tooling & test updates and removed other labels May 11, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates builder-vite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants