Browse tests that generated $7.3M in revenue.
Back to blog

What is Vite? How It Works and What Changed in Vite 8

14 min
Tim Davidson
Tim Davidson

Vite (French for "quick", pronounced "veet") is a frontend build tool. It gives you a development server that updates the browser as you edit your code, and a build command that bundles your code for production with Rolldown.

As of November 2026, the current version is Vite 8. Vite was created by Evan You, the creator of the Vue.js framework, and it now gets 65 million downloads a week. It's framework-agnostic, so it works with React, Vue, Svelte, and many other tools.

In this article, we'll cover how Vite works, how it relates to React, what changed in Vite 8, and how to migrate from Create React App. We'll also show you the two Vite defaults we change when we build Shopify themes for our clients.

Before we get started, if you run a Shopify store, grab our CRO Audit Megalist below. It's a 148-point spreadsheet that scores each item by impact and ease, so you know what to fix first.

Shopify CRO Audit Megalist

Get the exact audit system we've been paid to use on $100M+ stores.

    Shopify CRO Audit Megalist File Edit View Insert Format Data Tools Extensions Help Item Impact Ease Score Status 1 2 3 4 5 6 7 Brand logo appears in the same place as competitors 2 1 ★★★ ★★ Pass Navigation menu contains only key categories 4 3 ★★★★ ★ Warn Global breadcrumbs on all interior pages 2 2 ★★ ★★★ Fail Buttons are large and easy to tap on mobile 2 1 ★ ★★★★ Pass The website loads under 5 seconds on 3G 4 5 ★★★★★ Pass Search bar is prominently placed above the fold 3 2 ★★★ ★★ Warn Product images are high quality and consistent 5 3 ★★★★ ★

    What is Vite used for?

    Vite is used to develop and build web frontends. The most common use case is a single-page application built with React or Vue, where Vite acts as both the development server and the bundler.

    It also powers many of the frameworks you might already be using. Astro, Nuxt, SvelteKit, SolidStart, and React Router all run on Vite, so there's a good chance you've used it without installing it yourself. This website is built with Astro, which uses Vite as its development server and production bundler.

    Vite isn't limited to JavaScript applications either. Server-rendered projects like Laravel apps and Shopify themes use it to compile their CSS and JavaScript, while the server still renders the HTML.

    How does Vite work?

    A traditional bundler like Webpack has to bundle your entire application before the development server can show it to you, which means startup gets slower as your application grows.

    Vite avoids this by splitting your code into two groups. Dependencies rarely change, so Vite pre-bundles them once and reuses the result. Your source code changes constantly, so Vite serves it on demand over native ES modules and transforms each file when the browser requests it.

    Production works differently. Serving unbundled code to your users would mean a network round trip for every nested import, so vite build bundles your application into optimized files using Rolldown.

    Key features of Vite

    Vite logo

    Fast compilation and hot module replacement

    When you edit a file, hot module replacement swaps only that module, so you see the change in the browser in real time without a full page refresh.

    Lazy loading of modules

    Vite places each dynamically imported module in its own file, so the code for non-critical parts of your application is only loaded when it's needed.

    Tree-shaking and code splitting

    Tree-shaking removes unused code from your production build, while code splitting divides your code into smaller chunks loaded on demand. Together, they mean your users only download the code the current page needs.

    Built-in development server

    There's no separate tool to install and configure. The development server handles TypeScript, JSX, and CSS imports with little or no setup.

    It's fast. The development server starts quickly regardless of the size of your application, and production builds got much faster with Vite 8. Linear reported that its builds dropped from 46 seconds to 6 seconds.

    It needs little configuration. A basic React project can get by with one plugin in a short vite.config.ts file, which leaves fewer things to break during upgrades.

    Frameworks are built on it. Because so many frameworks run on Vite, what you learn on one project carries over to the next. The same configuration file, plugin system, and commands apply whether you're working on a Vue application or a Shopify theme.

    Disadvantages of Vite

    Vite has a few drawbacks that are worth knowing before you choose it for your project:

    Slower page loads in very large applications

    Vite's documentation acknowledges that "exceptionally large codebases can experience slow page loads" during development because of the high number of unbundled requests. The team is exploring a full bundle mode to address this.

    Limited support for older browsers

    Default builds target Chrome 111+, Edge 111+, Firefox 114+, and Safari 16.4+, and Vite doesn't include polyfills by default. This isn't a theoretical problem. Across three of our client Shopify stores, 0.27% of sessions over 90 days came from browsers that can't read some of the CSS Vite 8 outputs by default, about 6,000 out of 2.2 million. You can lower the targets or add @vitejs/plugin-legacy, but it takes extra setup.

    Differences between development and production

    Vite serves your code unbundled in development and bundled in production, so something that works on the development server can occasionally behave differently once it's built. Run npm run preview before you ship.

    Custom Webpack loaders don't carry over

    If your existing build depends on custom Webpack loaders, you'll need to find or write a Vite plugin to replace each one. This can make migrating a large, heavily customized project a bigger job.

    Vite vs React: do you need Vite for React?

    Vite and React aren't alternatives. React is a library for building user interfaces, and Vite is the tool that runs your React code in development and builds it for production.

    You don't strictly need Vite for React. Frameworks like Next.js come with their own build tooling. But for a plain React app, Vite is the default choice now that Create React App is deprecated. You can start a new React and TypeScript project with one command:

    bash
    npm create vite@latest my-app -- --template react-ts

    Routing and data fetching are up to you. If you'd rather have those included, the React team recommends starting with a framework like Next.js or React Router, and lists Vite as an option for custom setups.

    How to start a Vite project

    Getting started only takes one command:

    bash
    npm create vite@latest

    The CLI will ask you to pick a framework, with options including Vanilla, Vue, React, Preact, Lit, Svelte, Solid, and Qwik. From there, npm run dev starts the development server at http://localhost:5173, and npm run build creates your production files. You'll need Node.js 20.19+ or 22.12+.

    What changed in Vite 8?

    Vite 8 was released on March 12, 2026, and the biggest change is the bundler. Vite used to rely on two of them: esbuild during development and Rollup for production. Rolldown, a new bundler written in Rust ✨, now handles both jobs.

    The Vite team says Rolldown is 10 to 30 times faster than Rollup in benchmarks. Real-world results are more modest but still impressive. Beehiiv reported 64% shorter production builds.

    Most projects can upgrade with few changes, but check the migration guide first. build.rollupOptions has been renamed to build.rolldownOptions, although the old name still works for now. CSS minification now uses Lightning CSS by default, and the default browser targets have gone up to Chrome 111, Edge 111, Firefox 114, and Safari 16.4.

    Vite vs Create React App

    Many developers first come to Vite to get away from Create React App (CRA), so the comparison is still worth making.

    Project status

    This is the most important difference. CRA was deprecated for new apps on February 14, 2025 and no longer has active maintainers. Vite is actively developed, so we wouldn't start a new project on CRA.

    Build system

    CRA used Webpack to compile and optimize your code for production, while Vite uses Rolldown. This results in much faster builds with Vite.

    Development experience

    Vite serves your code on demand, so the development server starts quickly. CRA bundles your application with Webpack before it can show it to you, which gets slower as your project grows.

    Migrating from Create React App to Vite

    If you are still using CRA, migrating to Vite is worth planning. Start with a small, non-critical project if you can, and check that your libraries work with ES modules first. Then follow these steps:

    1. Update your dependencies. Install vite and @vitejs/plugin-react, and remove react-scripts from your package.json file.
    2. Add a config file. Create a vite.config.ts file in your project root and add the React plugin.
    3. Move your HTML file. Vite expects index.html in the project root, so move it out of public/ and add <script type="module" src="/src/index.jsx"></script>.
    4. Update your environment variables. Rename any REACT_APP_ variables to start with VITE_, and change process.env to import.meta.env.
    5. Update your scripts. Point your package.json scripts at vite and vite build.
    6. Test your code. Run your tests and check the production build with npm run preview to make sure everything is working as expected.

    Vite+: the next step for Vite

    Announced in October 2025 at the first in-person ViteConf in Amsterdam, Vite+ is a unified command-line tool from Evan You and the VoidZero team. It extends Vite with testing, linting, formatting, and more, turning it from a build tool into a complete JavaScript toolchain.

    What is Vite+?

    Vite+ consolidates your web development workflow into a single interface. Instead of juggling multiple tools and configuration files, you get one vite-plus dependency that replaces tools like vitest, eslint, prettier, tsup, and turbo.

    Evan You introduced Vite+ in this talk at ViteConf 2025. Some details have changed since then, including the license and the command name, so go by the sections below for the current setup.

    Everything runs through the vp command. These are some of the main ones:

    • vp dev and vp build run the development server and production builds, using Vite 8 and Rolldown
    • vp check handles formatting, linting, and type-checking with Oxfmt and Oxlint
    • vp test runs your tests with Vitest
    • vp pack bundles libraries with tsdown
    • vp run runs your project's tasks with caching through Vite Task
    • vp env manages your Node.js version

    Licensing and availability

    Vite+ was originally announced with a commercial licensing model, but VoidZero dropped that plan before the public release. It's now free and open source under the MIT license.

    Version 1.0 shipped on September 28, 2026. The team describes it as "far from feature-complete", with features like remote caching still to come.

    You don't need Vite+ to use Vite. It's worth a look if you're starting a new project and want fewer tools to configure. Our own Shopify template still uses plain Vite for now.

    Using Vite for Shopify themes

    Most Vite guides stop at React, but we also use it to build Shopify themes for our clients. Themes work a little differently because Liquid renders the page and Shopify's CDN serves the assets, so you can't simply point the browser at a development server. The Shopify Vite plugin solves this by generating a Liquid snippet that loads your files from the right place.

    Two of Vite's defaults can hurt a live store, and we change both on every theme:

    • emptyOutDir. Vite empties its output folder on every build, and in a theme that folder is assets/. In our test, a default build deleted an app's file and the store's logo. We turn it off and use a clean plugin that removes only the files Vite generated.
    • cssTarget. Vite 8 writes breakpoints as media query range syntax, which iOS Safari below 16.4 ignores. On those devices, a mobile-first theme shows the mobile layout at every width, which is the 0.27% of sessions we mentioned above. One line of config fixes it.

    We've written up the exact setup we use, including the full configuration, in our guide to Shopify theme development with Vite.

    Frequently asked questions

    Q: What is Vite?

    A: Vite is a frontend build tool. It consists of a development server that updates the browser as you edit your code, and a build command that bundles your code for production with Rolldown.

    Q: How does Vite work?

    A: During development, Vite pre-bundles your dependencies once and serves your source code on demand over native ES modules, so the server starts quickly. For production, it uses Rolldown to bundle your code into optimized files.

    Q: Is Vite a framework?

    A: No, Vite is a build tool. It runs your development server and bundles your code, but it doesn't provide components or routing. Frameworks like Astro, Nuxt, and SvelteKit run on top of Vite and add those features.

    Q: Is Vite for frontend or backend?

    A: Vite is a frontend tool. It runs on Node.js while you develop and build, but what it produces is code that runs in the browser. It can also build server-rendered bundles for frameworks, but it isn't a backend framework.

    Q: What is the difference between Vite and React?

    A: React is a library for building user interfaces. Vite is the build tool that runs your React code in development and bundles it for production. Most new React apps that don't use a framework like Next.js use Vite.

    Q: Can I use Vite with other frontend technologies, such as React or Vue.js?

    A: Yes, Vite works with React, Vue.js, Svelte, Solid, and other frontend technologies. It also works with server-rendered setups like Laravel and Shopify themes, where it compiles your CSS and JavaScript.

    Q: Is it safe to use Vite?

    A: Yes. Vite is open source under the MIT license and actively maintained. Its development server is meant for your own machine, so don't expose it to the internet, and keep Vite updated, since security fixes for the development server ship in patch releases.

    Q: What is the difference between Vite and Create React App?

    A: Create React App uses Webpack and was deprecated for new apps in February 2025. Vite is actively developed, uses Rolldown for production builds, and provides a faster development server, which makes it the better choice for new projects.

    Wrapping up

    Vite is the build tool most of modern frontend development runs on: a fast development server, Rolldown builds since Vite 8, and very little configuration. Whether you're starting a new project or leaving Create React App, it's the default choice in 2026. Just check its browser targets before you ship, especially if your users are on older iPhones and iPads.

    If you'd like this kind of setup running on your Shopify store, it's the same stack we use for our custom Shopify theme development.