Migrate Storybook from Webpack 5 to Vite builder#797
Draft
Conversation
- Update framework from @storybook/react-webpack5 to @storybook/react-vite - Replace webpackFinal with viteFinal in main.ts config - Remove @storybook/addon-webpack5-compiler-babel addon - Update all story file imports to use @storybook/react-vite - Update Bazel BUILD file to reference Vite packages - Bump storybook packages to ^10.2.7 for peer dep compatibility - Remove babel.config.json and webpack loader deps from BUILD Co-authored-by: adierkens <13004162+adierkens@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Storybook to use Vite builder
Migrate Storybook from Webpack 5 to Vite builder
Feb 10, 2026
… builtins, add @storybook/global - Replace webpack !!raw-loader! prefix with Vite ?raw suffix in all story files - Add node:module builtinModules to tsup external config for @player-ui/storybook - Add @storybook/global dependency (needed by @vueless/storybook-dark-mode bundled in addon) Co-authored-by: adierkens <13004162+adierkens@users.noreply.github.com>
Bundle ReportChanges will increase total bundle size by 1.89kB (0.03%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: plugins/shared-constants/coreAssets Changed:
|
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.
docs/storybook/.storybook/main.ts- Change framework from@storybook/react-webpack5to@storybook/react-vite, replacewebpackFinalwithviteFinal, remove webpack babel compiler addondocs/storybook/.storybook/preview.ts- ChangePreviewtype import to@storybook/react-viteMeta/StoryObjimports from@storybook/react-webpack5to@storybook/react-vitepackage.json- Add@storybook/react-vite, remove@storybook/react-webpack5and@storybook/addon-webpack5-compiler-babel, bump storybook versions to^10.2.7for peer dep compatibilitydocs/storybook/BUILD(Bazel) - Replace webpack references with Vite, remove webpack loaders (ts-loader,raw-loader) and babel config from deps!!raw-loader!webpack syntax with Vite?rawsuffix in all story files@player-ui/storybooktsup build - externalize Node.js builtins forplatform: "neutral"@storybook/globaldependency (needed by bundled@vueless/storybook-dark-mode)pnpm installto update lockfileOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.