Skip to content

add manual setup guide for react+vite without the cli#34570

Open
nitzan-treg wants to merge 1 commit into
storybookjs:nextfrom
nitzan-treg:fix/28218-documentation-add-documentation-for-manu
Open

add manual setup guide for react+vite without the cli#34570
nitzan-treg wants to merge 1 commit into
storybookjs:nextfrom
nitzan-treg:fix/28218-documentation-add-documentation-for-manu

Conversation

@nitzan-treg
Copy link
Copy Markdown

@nitzan-treg nitzan-treg commented Apr 16, 2026

hey, saw #28218 and took a look

added a new faq section to the react-vite framework docs that walks through setting up storybook manually without the cli -- installs, config files, package.json scripts, the whole thing. also added a pointer to it from the install page troubleshooting section so users hitting cli failures can find it. created the snippet files needed to back the new code examples.

fixes #28218


Closes #

What I did

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

  • Documentation
    • Added a comprehensive manual setup guide for Storybook with React and Vite, including step-by-step installation instructions and configuration examples in JavaScript and TypeScript.
    • Updated troubleshooting resources with a reference to the manual setup guide for users experiencing CLI installation issues.

`added a new faq section to the react-vite framework docs that walks through setting up storybook manually without the cli -- installs, config files, package.json scripts, the whole thing. also added a pointer to it from the install page troubleshooting section so users hitting cli failures can find it. created the snippet files needed to back the new code examples.`

Signed-off-by: nitzan-treg <nitzan.tregerman@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

📝 Walkthrough

Walkthrough

Added documentation snippets and FAQ section for manual Storybook setup with React and Vite. Includes installation commands, configuration file templates (main.js/ts and preview.js/ts), package.json script examples, and a troubleshooting reference.

Changes

Cohort / File(s) Summary
Documentation Snippets
docs/_snippets/react-vite-manual-install.md, docs/_snippets/react-vite-manual-main.md, docs/_snippets/react-vite-manual-preview.md, docs/_snippets/storybook-package-scripts.md
Added reusable code snippet files for manual React+Vite setup, including npm/pnpm/yarn installation commands, Storybook configuration (JS and TS variants), preview configuration, and package.json scripts.
React+Vite Documentation
docs/get-started/frameworks/react-vite.mdx, docs/get-started/install.mdx
Added FAQ section with step-by-step manual setup instructions and troubleshooting link referencing the new snippet files.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/get-started/frameworks/react-vite.mdx (1)

74-117: Consider adding prerequisites note.

The manual setup guide could benefit from a brief note mentioning that React and Vite should already be installed in the project, as this is a "React + Vite" setup guide. This would help users understand the starting point.

📝 Suggested addition after the opening paragraph
 If `npm create storybook@latest` isn't working for your project, you can set up Storybook manually in a few steps.
 
+<Callout variant="info">
+  This guide assumes you already have a React project with Vite installed. If you're starting from scratch, first create a React + Vite project using `npm create vite@latest`.
+</Callout>
+
 **1. Install the required packages**
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/get-started/frameworks/react-vite.mdx` around lines 74 - 117, Add a
brief "Prerequisites" note right after the opening paragraph of the "How do I
set up Storybook for React and Vite without the CLI?" section stating that the
project must already have React and Vite installed (and suggest Node/npm/yarn
versions if desired); reference the manual setup steps and files
(react-vite-manual-install.md, react-vite-manual-main.md,
react-vite-manual-preview.md, storybook-package-scripts.md) so users know this
guide assumes an existing React+Vite project before following the manual
Storybook steps.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/get-started/frameworks/react-vite.mdx`:
- Around line 74-117: Add a brief "Prerequisites" note right after the opening
paragraph of the "How do I set up Storybook for React and Vite without the CLI?"
section stating that the project must already have React and Vite installed (and
suggest Node/npm/yarn versions if desired); reference the manual setup steps and
files (react-vite-manual-install.md, react-vite-manual-main.md,
react-vite-manual-preview.md, storybook-package-scripts.md) so users know this
guide assumes an existing React+Vite project before following the manual
Storybook steps.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9547cf7f-6cea-4231-9dd0-6d86fe7bc4de

📥 Commits

Reviewing files that changed from the base of the PR and between 573755c and 47063ba.

📒 Files selected for processing (6)
  • docs/_snippets/react-vite-manual-install.md
  • docs/_snippets/react-vite-manual-main.md
  • docs/_snippets/react-vite-manual-preview.md
  • docs/_snippets/storybook-package-scripts.md
  • docs/get-started/frameworks/react-vite.mdx
  • docs/get-started/install.mdx

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

Projects

Status: Empathy Queue (prioritized)

Development

Successfully merging this pull request may close these issues.

[Documentation]: Add documentation for manual storybook setup without npx storybook init

2 participants