CLI: Remove watch mode from the build-storybook documentation#16165
Merged
Conversation
Nx Cloud ReportWe didn't find any information for the current pull request with the commit 121d862. Check the Nx Cloud Github Integration documentation for more information. Sent with 💌 from NxCloud. |
tysoncung
added a commit
to tysoncung/storybook
that referenced
this pull request
Mar 18, 2026
Re-implement the --watch / -w flag for 'storybook build' that was previously removed due to being broken. Changes: - Add -w/--watch CLI option to the build command - Add 'watch' property to CLIOptions type - Implement webpack watch mode using compiler.watch() instead of compiler.run() when --watch is passed - Implement vite watch mode by setting build.watch option - Handle rebuild logging and error recovery in watch mode - Prevent premature process exit and 'build completed' message in watch mode The watch flag was originally added via storybookjs#2762 but regressed at some point when the build pipeline was refactored. The CLI option was later removed entirely in storybookjs#16165 since it wasn't functional. This restores the feature by properly wiring the watch option through to both the webpack5 and vite builders. Fixes storybookjs#15946
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #15946
-wor--watch-modeflag doesn't do anything when running thebuild-storybookscript.What I did
--watch-modefrom commander so that it doesn't show up in the list of available options.How to test
Run
yarn build-storybook -h.--watch-modeshould no longer show up as an option.If your answer is yes to any of these, please make sure to include it in your PR.