Skip to content

Vite 7.0

SeungAh Hong3min read

Vite 7.0 Release: Key Changes and Migration Guide

On June 24, 2025, Vite 7.0 was officially released. This major version includes significant changes such as an updated Node.js support policy, revised browser targets, and Rolldown integration. Weekly downloads have reached 31 million, an increase of 14 million since the previous major release.

📋 Table of Contents

  1. Key Changes
  2. Comparison with Vite 6.0
  3. Migration Guide
  4. New Features
  5. Ecosystem Updates

Key Changes

1. Higher Node.js Support Requirements

Vite 7.0 now requires Node.js 20.19+ or 22.12+.

Reasons for the change:

  • A Node.js version that can use require(esm) without a flag is required
  • Vite can be distributed as ESM-only
  • Node.js 18 support has been dropped

2. Browser Target Change

The default browser target has changed from 'modules' to 'baseline-widely-available'.

Updated minimum browser versions:

BrowserVite 6.0Vite 7.0
Chrome87107
Edge88107
Firefox78104
Safari14.016.0

This change makes it possible to leverage more modern JavaScript features, reducing bundle size and improving performance.

3. Environment API Improvements

The experimental Environment API introduced in Vite 6 has been retained, with new features added.

Key additions:

  • buildApp hook: a new hook for coordinating between plugins during environment builds
  • Better plugin compatibility and per-environment build control

Comparison with Vite 6.0

Key Differences

FeatureVite 6.0Vite 7.0
Node.js minimum version18.0+20.19+ / 22.12+
Default browser target'modules''baseline-widely-available'
Rolldown supportNoneExperimental support
Sass Legacy APIDeprecatedRemoved
ESM distributionPartialFull ESM-only

Performance Improvements

  • Rolldown integration is expected to shorten build times for large projects
  • More efficient bundling and optimization

Migration Guide

Step 1: Check and Upgrade Your Node.js Version

# Check the Node.js version
node --version
 
# Upgrade to Node.js 20.19+ or 22.12+ is required

Step 2: Update package.json

{
  "devDependencies": {
    "vite": "^7.0.0"
  }
}

Step 3: Review Browser Targets

If you have set a custom browser target in vite.config.js, it needs to be reviewed:

// vite.config.js
export default {
  build: {
    // 필요시 타겟 조정
    target: 'baseline-widely-available',
  },
};

Step 4: Remove Deprecated Features

Removed features:

  • Sass Legacy API support
  • Other deprecated APIs

If you use Sass, you need to migrate to the Modern API:

// vite.config.js
export default {
  css: {
    preprocessorOptions: {
      scss: {
        // Legacy API 옵션 제거
        // api: 'legacy' // 제거
        api: 'modern', // 또는 생략 (기본값)
      },
    },
  },
};

Step 5: Update Vitest

If you use Vitest, update to 3.2 or later:

{
  "devDependencies": {
    "vitest": "^3.2.0"
  }
}

New Features

1. Rolldown Integration (Experimental)

Rolldown, a new Rust-based bundler, has been integrated experimentally.

How to use:

npm install --save-dev rolldown-vite
// vite.config.js
import { defineConfig } from 'vite';
import rolldown from 'rolldown-vite';
 
export default defineConfig({
  plugins: [rolldown()],
});

Advantages:

  • Faster build times (especially for large projects)
  • Planned to be adopted as the default bundler in the future
  • Leverages the performance benefits of Rust

2. buildApp Hook

With the new buildApp hook, plugin developers can control per-environment builds more granularly:

// 플러그인 예시
export default function myPlugin() {
  return {
    name: 'my-plugin',
    buildApp: {
      handler(options) {
        // 환경별 빌드 로직
        console.log('Building environments:', options.environments);
      },
    },
  };
}

Ecosystem Updates

ViteConf 2025

  • The first in-person ViteConf will be held in Amsterdam (October 9–10)
  • Growth of the Vite ecosystem and community engagement

Vite DevTools

New developer tools being built through a collaboration between VoidZero and NuxtLabs:

  • Improved debugging experience
  • Performance profiling
  • Plugin insights

Documentation Translation

A Persian (فارسی) documentation translation has been added, making Vite accessible to even more developers.

Wrapping Up

Vite 7.0 is an important update that improves performance, modernity, and developer experience. While there are changes to Node.js requirements and the removal of some deprecated features, migrating from Vite 6 is generally smooth overall.

Key checklist:

  • ✅ Upgrade to Node.js 20.19+ or 22.12+
  • ✅ Review browser targets
  • ✅ Remove deprecated features
  • ✅ Update Vitest to 3.2+ (if applicable)
  • ✅ Test the experimental Rolldown feature (optional)

For a detailed migration guide, refer to the official documentation.