Talk
Running Storybook inside your Vite app
Vite's Environment API lets one dev server run several environments, each with its own config and plugin pipeline. This talk is a walkthrough of a real use of it: a Vite plugin that runs Storybook inside your app's dev server.
You add it to the plugins array in your Vite config. Storybook then runs in the same process, on the same port, over the same websocket. It does not share your app's config. Your app keeps its plugin pipeline, and Storybook resolves its own with a separate dependency cache. The storybook dev CLI still works and is still the default way to run it.
If you build tooling on Vite, you'll see how to run an app inside another dev server, and what breaks when you do.
About Julien Huang
Julien is a Software Engineer at Chromatic and a core member of the Storybook team. He's also part of the Nuxt core team, contributing to the Nuxt and Vue ecosystems in his spare time.
Away from the keyboard, you'll find him gaming, powerlifting, cooking, or playing music.