Merge pull request #15103 from storybookjs/docs/contributing-without-watch-mode

Docs: Explain build without watch mode
This commit is contained in:
Michael Shilman 2021-05-31 19:06:44 +08:00 committed by GitHub
commit 09a31bf29d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,10 @@ yarn build
When asked if you want to start the build in `watch` mode, answer **yes** to develop in interactive mode. Afterward, choose which packages you want to build. For example, if you're going to work on a feature for `@storybook/addon-docs`, you might want to select `@storybook/addon-docs` and `@storybook/components`.
<div class="aside">
💡 Build's `watch' mode is great for interactive development. However, for performance reasons it only transpiles your code and doesn't execute the TypeScript compiler. If something isn't working as expected, try running `build` <b>WITHOUT</b> watch mode: it will re-generate TypeScript types and also perform type checking for you.
</div>
![Storybook package selector](./storybook-build-packages-selection-optimized.png)
If the work you'll be doing affects the `Preview` (the innermost Storybook `iframe`, where the stories are displayed), it will automatically refresh one to two seconds after you save.