Skip to content

Commit c03dad5

Browse files
authored
Update Readme (#546)
1 parent 1607b74 commit c03dad5

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

packages/builder-vite/README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
Build your stories with [vite](https://vitejs.dev/) for fast startup times and near-instant HMR.
44

5+
**Note:** This Repository is for Storybook 6.4 and 6.5. In Storybook 7, the Vite builder was brought into the main Storybook monorepo (https://github.com/storybookjs/storybook). See https://storybook.js.org/blog/first-class-vite-support-in-storybook/ for details.
6+
57
# Table of Contents <!-- omit in toc -->
68

7-
- [Migration from storybook-builder-vite](#migration-from-storybook-builder-vite)
89
- [Installation](#installation)
910
- [Usage](#usage)
1011
- [Getting started with Vite and Storybook (on a new project)](#getting-started-with-vite-and-storybook-on-a-new-project)
@@ -15,29 +16,16 @@ Build your stories with [vite](https://vitejs.dev/) for fast startup times and n
1516
- [React Docgen](#react-docgen)
1617
- [Note about working directory](#note-about-working-directory)
1718
- [Known issues](#known-issues)
19+
- [Migration from storybook-builder-vite](#migration-from-storybook-builder-vite)
1820
- [Contributing](#contributing)
1921
- [About this codebase](#about-this-codebase)
2022

21-
## Migration from storybook-builder-vite
22-
23-
This project has moved from `storybook-builder-vite` to `@storybook/builder-vite` as part of a larger effort to improve Vite support in Storybook. To automatically migrate your existing project, you can run
24-
25-
```bash
26-
npx sb@next automigrate
27-
```
28-
29-
To manually migrate:
30-
31-
1. Remove `storybook-builder-vite` from your `package.json` dependencies
32-
2. Install `@storybook/builder-vite`
33-
3. Update your `core.builder` setting in `.storybook/main.js` to `@storybook/builder-vite`.
34-
3523
## Installation
3624

3725
Requirements:
3826

3927
- Vite 4.0 or newer (for Vite v3, use `@storybook/builder-vite@0.2.x`)
40-
- Storybook 6.4.0 or newer (for storybook 6.3, use `storybook-builder-vite@0.1.16`)
28+
- Storybook 6.4 or 6.5 (for storybook 7, see https://github.com/storybookjs/storybook/tree/next/code/lib/builder-vite)
4129

4230
```bash
4331
npm install @storybook/builder-vite --save-dev
@@ -132,7 +120,9 @@ The function should return the updated Vite configuration.
132120

133121
### Svelte Customization
134122

135-
When using this builder with Svelte, your `.storybook/main.js` (or equivalent)
123+
When using this builder with Svelte, your `svelte.config.js` file will be used automatically.
124+
125+
If you need to make overrides for Storybook, your `.storybook/main.js` (or equivalent)
136126
can contain a `svelteOptions` object to pass custom options to
137127
[`vite-plugin-svelte`](https://github.com/sveltejs/vite-plugin-svelte/tree/main/packages/vite-plugin-svelte):
138128

@@ -203,6 +193,20 @@ storybook configuration directory. This can be overridden in viteFinal.
203193
204194
- HMR: saving a story file does not hot-module-reload, a full reload happens instead. HMR works correctly when saving component files.
205195
196+
## Migration from storybook-builder-vite
197+
198+
This project has moved from `storybook-builder-vite` to `@storybook/builder-vite` as part of a larger effort to improve Vite support in Storybook. To automatically migrate your existing project, you can run
199+
200+
```bash
201+
npx sb@next automigrate
202+
```
203+
204+
To manually migrate:
205+
206+
1. Remove `storybook-builder-vite` from your `package.json` dependencies
207+
2. Install `@storybook/builder-vite`
208+
3. Update your `core.builder` setting in `.storybook/main.js` to `@storybook/builder-vite`.
209+
206210
## Contributing
207211
208212
The Vite builder cannot build itself.

0 commit comments

Comments
 (0)