<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ian VanSchooten on Medium]]></title>
        <description><![CDATA[Stories by Ian VanSchooten on Medium]]></description>
        <link>https://medium.com/@IanVS?source=rss-352683bcb6e9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NhEwStx6sSEBAp0v8dhCIg.jpeg</url>
            <title>Stories by Ian VanSchooten on Medium</title>
            <link>https://medium.com/@IanVS?source=rss-352683bcb6e9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 15:27:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@IanVS/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[First-class Vite support in Storybook]]></title>
            <link>https://medium.com/storybookjs/first-class-vite-support-in-storybook-537746b6f8a5?source=rss-352683bcb6e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/537746b6f8a5</guid>
            <category><![CDATA[vitejs]]></category>
            <category><![CDATA[storybook]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Ian VanSchooten]]></dc:creator>
            <pubDate>Thu, 13 Oct 2022 15:12:48 GMT</pubDate>
            <atom:updated>2022-10-24T12:57:06.667Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1xNIBKRDEMGV8YkSQBCBg.gif" /></figure><h4>Storybook 7.0 brings lots of Vite improvements: pre-bundled for speed, zero config setup, no Webpack required, and smaller install size.</h4><p>Vite is a next-gen build tool that has taken the web development world by storm. It offers developers fast startup, instant reloads, widespread compatibility, and easy configuration. With nearly 50k stars in GitHub, almost 2 million weekly npm downloads, and over 650 contributors, Vite is clearly a “big deal.”</p><p>Storybook has supported Vite since April, 2021 (two months after Vite 2.0 was released), thanks to a community project started by Eirik Sletteberg. We saw rapid adoption of this experimental Vite adapter.</p><p>Starting in Storybook 7.0, Vite is one of two built-in options for building your component code (the other is Webpack 5). This means Vite has a tighter integration with Storybook functionality, and can be automatically tested against all core Storybook changes.</p><p>Over the last year, the team re-architected Storybook for first-class Vite support. Let’s dive into the improvements that are coming in Storybook 7.0.</p><ul><li>🏎️ Pre-bundled for performance</li><li>🙅 No Webpack and smaller install size</li><li>🪄 Zero config</li><li>🌐 Wide ecosystem support</li></ul><h3>Pre-bundled for performance</h3><p>Storybook 7.0 ships as a pre-bundled app to speed up start and build times. Storybook has two parts: an iframe that renders your components in isolation and Storybook’s own app for navigating stories and addons.</p><p>Previously, running Storybook involved building both the component code and the Storybook app on-demand. That was slower because each step takes time.</p><figure><img alt="Diagram showing Storybook’s UI, differentiating between the “Preview” iframe where components are rendered, and the “Manager” which is the rest of the Storybook interface." src="https://cdn-images-1.medium.com/max/1024/0*-GmU9KifDSuRA-cg.png" /></figure><p>Pre-bundling means the Storybook app ships as a compiled code base instead of a set of dependencies that you then have to compile yourself. Storybook does less work to start up each time because all that work is done in advance. In a new project I tested, the <strong>build time was reduced by over 15 seconds</strong>, and the Storybook dev server started up several seconds faster as well.</p><figure><img alt="Animation of layers folding down into a single plane. The layers are “View layer”, “CSS in JS”, “Style manager”, “Data layer”, and “Build tool”" src="https://cdn-images-1.medium.com/max/729/0*ZNfedhstUk7rspJc.gif" /></figure><h3>No Webpack and smaller install size</h3><p>Another benefit of pre-bundling is that Storybook Vite users will no longer have to install or use Webpack. In the past, Storybook used Webpack to build its UI. Storybook 7.0 prebuilds the app using esbuild, which is the same engine that supercharges Vite’s development experience.</p><p>Vite users demand speed and small, modern dependencies. Storybook 7.0 supports modern browsers and Node.js versions, which enabled us to remove unnecessary internal dependencies. That has <strong>streamlined Storybook’s install size by 28% so far</strong>.</p><h3>Zero config</h3><p><strong>Storybook 7.0 extends from your existing Vite config file</strong>. This means you’ll no longer need to duplicate your config or manually merge them to keep your configuration aligned.</p><p>Originally, we expected that users would want a clear separation between their app’s Vite configuration and Storybook’s Vite configuration. This gives more control over how components are built. But our assumption wasn’t quite right. Tools like Vitest and Vite itself showed us that developers appreciate tools that “just work”. So now, Storybook extends your existing config.</p><figure><img alt="A Vite logo being wrapped in a dashed box with the storybook icon, demonstrating the way storybook wraps a project’s Vite configuration." src="https://cdn-images-1.medium.com/max/594/0*67TLsnQVGFhgBlKI.png" /></figure><p>If you want more control over Vite configuration, you can still tweak the config for Storybook using the viteFinal option (most projects will no longer need this though).</p><pre>// .storybook/main.js|mjs|ts<br> <br>import { mergeConfig } from &#39;vite&#39;;<br> <br>export default {<br> stories: [<br>   &#39;../stories/**/*.stories.mdx&#39;,<br>   &#39;../stories/**/*.stories.@(js|jsx|ts|tsx)&#39;,<br> ],<br> addons: [&#39;@storybook/addon-essentials&#39;, &#39;storybook-addon-designs&#39;],<br> framework: &#39;@storybook/react-vite&#39;,<br> async viteFinal(config) {<br>   // Merge custom configuration into the default config<br>   return mergeConfig(config, {<br>     // Add storybook-specific dependencies to pre-optimization<br>     optimizeDeps: {<br>       include: [&#39;storybook-addon-designs&#39;],<br>     },<br>   });<br> },<br>};</pre><p>And speaking of configuration, 7.0 configuration files can now be written in TypeScript or native ESM without needing any other tooling.</p><h3>Wide ecosystem support</h3><p>Vite has widespread support for many frameworks and tools, and Storybook 7.0 has been refactored to make it easier to support those frameworks. We’ve added first-class support Vue 2, Lit, and SvelteKit in addition to React, Vue 3, Svelte and others which have been supported since 6.5.</p><p>These all work with zero additional config, and they’ll be tested and maintained with every Storybook release.</p><figure><img alt="An animation showing the Storybook logo, being connected by lines to the logos of other projects, Vue, Svelte, Pnpm, and Lit, through the Vite logo." src="https://cdn-images-1.medium.com/max/540/0*r1DL8Fgx_TPIQNSG.gif" /></figure><h3>Roadmap for Vite</h3><p>Storybook for Vite is already used in hundreds of production apps. In fact, Storybook’s Vite builder receives nearly 200,000 downloads each week, a full tenth as many downloads as Vite itself. The upcoming 7.0 release will be a huge quality-of-life improvement for all these users.</p><p>We’ve moved the Vite builder into the Storybook monorepo, making it <strong>more stable</strong> and ensuring that it gets more attention from Storybook contributors.</p><p>We are working to <strong>improve Storybook’s pnpm support</strong>, which many Vite projects use. Our goal is for 7.0 to work seamlessly in pnpm projects without any workarounds or special configuration. We’ve already made some improvements, and keep your eye on the 7.0 release notes for more to come.</p><p>In addition, we’ll continue to <strong>focus on performance</strong> — making Storybook as fast as possible to install, build, start up, and run. Plus, expect more improvements to Storybook’s best-in-class testing and documentation tooling.</p><h3>Try it today</h3><p>Storybook is committed to Vite support and will continue to refine and improve the experience for Vite users. Storybook 7.0 is currently in a late-alpha stage, and will be hitting beta soon. This means we still anticipate some possibly-disruptive changes to occur, but most of the features discussed above are ready to try out today.</p><p>If you’re already using Storybook with Vite, you can upgrade to 7.0 version by running:</p><pre>npx sb@next upgrade --prerelease</pre><p>The CLI will automatically account for many of the breaking changes, but be sure to read through the <a href="https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-65x-to-700">migration guide</a> for details on any other changes to make.</p><p>If you don’t have a Storybook project, it’s easy to get started:</p><pre>npx sb@next init --builder=vite</pre><p>We’d love to hear your thoughts and experiences trying out Storybook 7.0 with Vite! I monitor the #vite channel in the Storybook <a href="http://discord.gg/storybook">Discord</a> if you’d like to chat, or feel free to open an issue or discussion in <a href="https://github.com/storybookjs/storybook">GitHub</a> and tag me (@IanVS). Finally, follow <a href="https://twitter.com/storybookjs">@storybookjs</a> and <a href="https://twitter.com/ianvanschooten">@ianvanschooten</a> on Twitter for all the latest Storybook news and announcements.</p><h3>Storybook on Twitter: &quot;Storybook 7.0 brings first-class Vite support⚡🪄 Zero config setup🙅 No Webpack required🗜️ Smaller install size🏎️ Storybook UI is pre-bundled for performance🌐 Works with Vue 2 + 3, Svelte, React and moreRead &quot;&quot; https://t.co/qjZsywQU1M🧵1/- pic.twitter.com/Cb7u8h9eLi / Twitter&quot;</h3><p>Storybook 7.0 brings first-class Vite support⚡🪄 Zero config setup🙅 No Webpack required🗜️ Smaller install size🏎️ Storybook UI is pre-bundled for performance🌐 Works with Vue 2 + 3, Svelte, React and moreRead &quot;&quot; https://t.co/qjZsywQU1M🧵1/- pic.twitter.com/Cb7u8h9eLi</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Ff%2Fd42fc0%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Ff%2Fd42fc0&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/ab1b78336275ac24b7efa935df24c4ee/href">https://medium.com/media/ab1b78336275ac24b7efa935df24c4ee/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=537746b6f8a5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/storybookjs/first-class-vite-support-in-storybook-537746b6f8a5">First-class Vite support in Storybook</a> was originally published in <a href="https://medium.com/storybookjs">Storybook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Storybook Performance: Webpack vs Vite]]></title>
            <link>https://medium.com/storybookjs/storybook-performance-webpack-vs-vite-c1b766af6258?source=rss-352683bcb6e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1b766af6258</guid>
            <category><![CDATA[vites]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[storybook]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Ian VanSchooten]]></dc:creator>
            <pubDate>Wed, 04 May 2022 14:35:33 GMT</pubDate>
            <atom:updated>2022-05-10T12:55:09.139Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*D3lOfeqfBld9EV_q5-kWiA.gif" /></figure><h4>We benchmarked both builders to see which is faster.</h4><p>Storybook is the industry-standard UI component workshop. Thousands of application and design system teams worldwide spend most of their day working inside Storybook—building, documenting, and testing their UI components. Therefore, Storybook needs to run as fast as possible, so it does not slow down their workflow.</p><p>Storybook&#39;s performance when first booting up or rebuilding a changed file largely depends on how it bundles up the stories and components. Optimizing the build process offers lots of opportunities for performance gains in Storybook. Improvements for Webpack and Vite builders are part of this larger ongoing optimization effort.</p><p>This article looks at options to help you get the quickest development experience possible today. We&#39;ll examine the impact of upgrading to Webpack 5, enabling features such as code-splitting or lazy compilation and finally switching to the Vite builder. Storybook is committed to first-class support of Vite projects, and getting a baseline of our performance is the first step towards further optimization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1WQzAVmTVwP_pqDk.png" /></figure><h3>Storybook builders</h3><p>Storybook is powered by <a href="https://storybook.js.org/blog/storybook-for-webpack-5/#what-s-a-builder">builders</a> such as Webpack or Vite, which process and bundle up your code—Javascript, TypeScript, CSS, MDX, and even framework-specific modules like Vue or Svelte SFCs.</p><figure><img alt="Diagram of parts of your code (js, css, mdx, etc) being joined by Storybook into the storybook app, with the manager UI of the sidebar, toolbar, and addons pane, and the preview iframe of the stories themselves." src="https://cdn-images-1.medium.com/max/1024/0*M0OlA7ECLwHUJfSB.png" /></figure><p>Currently, Webpack is Storybook&#39;s default builder. Storybook uses Webpack to compile its own UI (the sidebar, panels, buttons, etc.) and the preview (your stories and documentation pages). With Storybook 6.4 and above, it&#39;s possible to switch to <a href="https://github.com/storybookjs/builder-vite">@storybook/builder-vite</a> to build the preview using Vite instead of Webpack.</p><h3>Storybook Vite Builder</h3><p><a href="https://vitejs.dev/">Vite</a> is a next-gen build tool that aims to provide a faster and leaner development experience. Instead of bundling up your entire project into one or more chunks, it serves individual ES modules to the browser during development. This allows it to start up nearly instantly. Then when you update your code, hot module replacement (HMR) only needs to replace one small file rather than rebundle the entire app, making rebuilds lightning quick.</p><p>When using the <a href="https://storybook.js.org/blog/storybook-for-vite/">Storybook Vite Builder</a>, you&#39;ll be able to use the same Vite plugins and configuration as your Vite app and continue to take advantage of the Storybook addon ecosystem.</p><p>So, with Vite promising such excellent performance, is Webpack obsolete? Well, hold on, the Storybook team has been working hard to improve Webpack performance too. They&#39;ve introduced features like <a href="https://storybook.js.org/blog/storybook-lazy-compilation-for-webpack/">lazy compilation</a> to speed up development performance and an <a href="https://storybook.js.org/blog/storybook-on-demand-architecture/">on-demand architecture</a> to reduce initial load times by leveraging code-splitting.</p><p>Let&#39;s find out if these changes are enough to match the performance of Vite in a real-world Storybook project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*un6UoLUD_gjLE_m9.png" /></figure><h3>Benchmarking Storybook performance using IBM Carbon Design System</h3><p>To compare the performance of these two builders, I chose to run benchmarks against <a href="https://github.com/carbon-design-system/carbon/tree/main/packages/react">IBM’s Carbon Design System</a>. Carbon has a relatively large Storybook, with over 100 React components and 250 stories using a mix of <a href="https://storybook.js.org/blog/component-story-format/">CSF</a> and <a href="https://storybook.js.org/blog/rich-docs-with-storybook-mdx/">MDX format</a>. Carbon uses Webpack 5 but not the lazy compilation or code-splitting features. Its configuration is not tightly coupled to Webpack, allowing for a reasonably straightforward migration to the Vite Builder.</p><p>This is just one example project, and these results might be different from what you would see in your own project. Performance is a complex topic which can be affected by many factors, but the results in the Carbon project illustrate some interesting differences between Storybook builder options.</p><h3>Methodology</h3><p>Before digging into the results, let me explain how I ran these benchmarks. I used <a href="https://github.com/storybookjs/bench/tree/storyRender">@storybook/bench</a> to get a complete picture of the performance differences between builders. It measures the total time for the dev server to start up and render a story in the browser, the time it takes to create a production build, and the time it takes for a browser to render the first story for a published Storybook. I also calculated the total time between editing a file and the story re-rendering in the browser using HMR.</p><p>I took the average of five samples for each of these times on my 2019 Intel Macbook Pro and compared the results of five different Storybook builder configurations:</p><ul><li>Webpack 4</li><li>Webpack 5</li><li>Webpack 5 LC/CS (lazy compilation &amp; code-splitting enabled)</li><li>Vite</li><li>Vite CS (code-splitting enabled)</li></ul><h3>Results</h3><p>There are two different ways that Storybook can build your app. When you are working on it during development, you have to wait for the storybook dev server to start and open a browser with your stories. When you’re finished, Storybook runs a production build so you can <a href="https://storybook.js.org/blog/interaction-testing-with-storybook/">run tests</a> in CI and publish to the web. Storybook also rebuilds your story while you are working on it each time you save, so we will look at how long that takes, as well.</p><h3>Development (cold start)</h3><p>The first scenario we&#39;ll examine is the cold start of the dev server. This is how long you wait between the first time you run start-storybook and the story loading up in your browser.</p><p>The Carbon project with its default configuration (Webpack 5 without code-splitting or lazy compilation) takes 61 seconds to start the dev server and render a story in the browser, about the same time as it takes Webpack 4. However, enabling lazy compilation cuts that time in half to 30 seconds.</p><figure><img alt="Bar chart of Time to First Story (cold) results. Webpack 4: 59.5s, Webpack 5: 60.9s, Webpack 5 (lazy compilation &amp; code-splitting): 30.3s, Vite: 103.8s, Vite (code-splitting): 36.7s." src="https://cdn-images-1.medium.com/max/1024/0*Tgq7Pppwqrukj8-Z.png" /></figure><p>Vite is meant to be lightning-quick, but surprisingly it was slower on the first page load. What happened? Remember that Vite sends each module to the browser unbundled, so even though the dev server started up quickly, the browser needed more time to download and process all those requests.</p><p>For comparison, Webpack sends between 16 and 33 assets to the browser, and Vite sends a whopping 1,060 if code-splitting is not enabled.</p><p>Enabling code-splitting (<a href="https://storybook.js.org/docs/react/configure/overview#on-demand-story-loading">storyStoreV7</a>) drastically reduces that number to 250 and we see that the speed improves, though startup was still slightly slower than Webpack 5 with lazy compilation enabled.</p><h3>Development with cache (Warm Start)</h3><p>After the first run, Storybook caches some of the build artifacts, so the subsequent starts are faster. The build times we see here are indeed faster across the board, and the same pattern applies. Webpack 5 with lazy compilation takes the cake, at 11 seconds before the first story loads, followed closely by Vite with code-splitting taking 15 seconds. The baseline Webpack 4 and Webpack 5 configs took nearly half a minute.</p><figure><img alt="Bar chart of Time to First Story (warm) results. Webpack 4: 29.6s, Webpack 5: 29.3s, Webpack 5 with lazy compilation &amp; code-splitting: 10.8s, Vite: 48.1s, Vite with code-splitting: 14.7s." src="https://cdn-images-1.medium.com/max/1024/0*lD3_-LmB9znEpmBc.png" /></figure><h3>Production build time</h3><p>To <a href="https://storybook.js.org/docs/react/sharing/publish-storybook">publish</a> your Storybook online, you need to build it as a static web application using build-storybook. Unlike local development, production builds do not require HMR. Therefore, instead of serving individual modules, Vite bundles everything up, similar to Webpack. Under the hood, it uses Rollup with an opinionated configuration for this task.</p><p>Here too, we find that Vite takes a little longer than Webpack to bundle the assets.</p><figure><img alt="Bar chart of production build results. Webpack 4: 71.3s, Webpack 5: 77.5s, Webpack 5 with lazy compilation &amp; code-splitting: 75.4s, Vite: 96.8s, Vite with code-splitting: 81.9s." src="https://cdn-images-1.medium.com/max/1024/0*hx472C-E5XGpDdkd.png" /></figure><h3>Production load size and time</h3><p>Vite uses Rollup to perform a more aggressive <a href="https://rollupjs.org/guide/en/#tree-shaking">dead-code elimination</a> (tree shaking) than Webpack, which is why it takes longer to create a production build. However, the trade-off is that it generates smaller bundles, as seen in the graph below.</p><p>Generally, this means that Storybooks bundled for production by Vite will load up slightly faster for the end-user and require less bandwidth than those generated with the standard Webpack 4 or 5 configurations.</p><figure><img alt="Bar chart of Request size results. Webpack 4: 12.4MB, Webpack 5: 11.6MB, Webpack 5 with lazy compilation &amp; code-splitting: 7.3MB, Vite: 9.4MB, Vite with code-splitting: 5.7MB." src="https://cdn-images-1.medium.com/max/1024/0*BY4DFNcLSOl0zOnx.png" /></figure><p>Note that lazy compilation is a development-only feature, but the Webpack 5 LC/CS build also uses code-splitting, which explains the smaller request size seen above. Also keep in mind that while code-splitting allows the first page to load more quickly, navigating to other stories may take slightly longer because more javascript is requested and downloaded each time.</p><h3>Rebuild time (Hot Module Reloading)</h3><p>So far, things aren&#39;t looking that great for Vite. Compared to Webpack 5 with lazy compilation, Vite has a slightly slower dev startup time and somewhat longer production build time even with code-splitting enabled.</p><p>But one of the big reasons developers love Vite is the near-instant feedback loop between saving a file and seeing your changes in the browser. This is why it serves files unbundled in development, after all. Not surprisingly, this is where Vite really shines. Changes to React components took only half a second to appear in the browser, whereas Webpack took up to three and a half seconds.</p><figure><img alt="Bar chart of Hot Module Reloading (HMR) results. Webpack 4: 2.26s, Webpack 5: 3.67s, Webpack 5 with lazy compilation &amp; code-splitting: 1.01s, Vite: 0.53s, Vite with code-splitting: 0.50s." src="https://cdn-images-1.medium.com/max/1024/0*eKQQEJqcKTwXEg3m.png" /></figure><p>Lazy compilation for Webpack cuts down refresh time to only one second, but that&#39;s still double the time of Vite. These may seem like small numbers, but they add up to make a big difference. Your changes appear to happen instantly when using Vite, allowing you to keep your train of thought and iterate rapidly while building components.</p><h3>Takeaways</h3><p>Vite has lightning-quick rebuild times, but you&#39;ll have to enable the code-splitting feature to get the full benefits and avoid slow first-page load times for larger projects.</p><pre>// .storybook/main.js<br> <br>module.exports = {<br> stories: [],<br> addons: [&#39;@storybook/addon-essentials&#39;],<br> features: {<br>   storyStoreV7: true,<br> },<br> core: { builder: &quot;@storybook/builder-vite&quot; },<br>};</pre><p>Don&#39;t expect faster production build times by switching to the Vite Builder, but you&#39;ll likely get smaller production bundles that speed up load times for published Storybooks.</p><p>If your app relies heavily on Webpack, upgrading to Webpack 5 and enabling code-splitting and lazy compilation can be a quick win. You can expect startup and rebuild times comparable to Vite in many cases.</p><h3>The future of Storybook with Vite</h3><p>Storybook&#39;s support for Vite is continually improving. The Vite builder started as a community project and is maintained by <a href="https://github.com/IanVS">Ian VanSchooten</a> (me), <a href="https://github.com/joshwooding">Josh Wooding</a>, and <a href="https://twitter.com/eirikobo">Eirik Sletteberg</a>. It was recently moved under the @storybook org as part of a commitment to improve Vite support in Storybook.</p><p>The Storybook team has already started exploring pre-bundling the manager so that you won’t need to install Webpack at all when using the Vite Builder. In the future, using HTTP/3 could help reduce the cost of Vite sending so many modules to the browser at once, and we’ll be looking for other ways to improve performance as well. In collecting the data for this blog post, we already found one improvement that sped up our example build times by over 50%.</p><p>I’d encourage you to try the 6.5 beta release of Storybook and experiment with builder features to make your Storybook faster. Every project is different, and what works well in one project may not in another. To experiment with Vite and storybook in a new project, use npm create vite and the npx sb@next init command. For existing projects that use Webpack, check out the <a href="https://storybook.js.org/docs/6.5/react/builders/webpack#code-splitting">configuration guide</a> to take advantage of Webpack 5 perf improvements. Or migrate to Vite using the <a href="https://github.com/storybookjs/builder-vite">installation instructions</a>.</p><p>We would love for you to get involved in the project. Drop by the <a href="https://discord.com/channels/486522875931656193/826188253849190450">#vite channel</a> in Storybook Discord to report issues or share ideas for improvement. I’ll also be happy to answer any questions about this benchmarking project. If these results are surprising, or if they match up with your own experience, let us know on Twitter.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1b766af6258" width="1" height="1" alt=""><hr><p><a href="https://medium.com/storybookjs/storybook-performance-webpack-vs-vite-c1b766af6258">Storybook Performance: Webpack vs Vite</a> was originally published in <a href="https://medium.com/storybookjs">Storybook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>