Skip to content

Chore: vite-config-custom to typescript package#253

Merged
github-actions[bot] merged 3 commits intomainfrom
bump-packages
Oct 8, 2025
Merged

Chore: vite-config-custom to typescript package#253
github-actions[bot] merged 3 commits intomainfrom
bump-packages

Conversation

@black7375
Copy link
Contributor

@black7375 black7375 commented Oct 8, 2025

Related Issue

Summary by CodeRabbit

  • New Features

    • Added a ready-to-use ESLint config for the Vite config package.
  • Refactor

    • Migrated ESLint configs to the newer ESLint API and improved TypeScript typings across Vite config helpers and examples.
  • Chores

    • Upgraded Yarn and many dependencies (ESLint, TypeScript, Vite, React, Babel, Prettier, etc.) across packages and examples.
    • Standardized packages to built/dist outputs with explicit export maps and added build scripts.
    • Added/updated TypeScript project references for faster builds.
    • CI: enhanced install path with additional validation, dependency checks, and audit steps.

Additional context

Checklist

black7375 and others added 3 commits September 10, 2025 00:00
Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).

Updates `vite` from 6.3.5 to 6.3.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
@changeset-bot
Copy link

changeset-bot bot commented Oct 8, 2025

⚠️ No Changeset found

Latest commit: 50bc9d0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

Triggered from #253 by @​black7375.

Checking if we can fast forward main (bc7dd88) to bump-packages (4fc3ac8).

Target branch (main):

commit bc7dd88d744fe292db499108074d2a06c49a2063 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Aug 16 00:00:00 2025 +0900

    Refactor: `styled` code order & naming

Pull request (bump-packages):

commit 4fc3ac8c6c209e816fe45bcb876dff61cd75d4dc (pull_request/bump-packages)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Fri Sep 12 00:00:00 2025 +0900

    Chore(Bump): deps

It is possible to fast forward main (bc7dd88) to bump-packages (4fc3ac8). If you have write access to the target repository, you can add a comment with /fast-forward to fast forward main to bump-packages.

@coderabbitai
Copy link

coderabbitai bot commented Oct 8, 2025

Walkthrough

Migrated ESLint configs to use eslint/config/defineConfig, bumped many dependency versions (root, packages, examples), added tsconfig project references and new tsconfigs for configs/vite-config-custom, changed vite-config-custom to dist-based package outputs and stronger TypeScript typings, and updated Yarn/Turbo/CI settings.

Changes

Cohort / File(s) Summary
Yarn & Turbo config
./.yarnrc.yml, ./turbo.json
Bumped yarnPath to yarn-4.10.3, adjusted packageExtensions key formatting, and renamed turbo globalDependencies from "packages.json""package.json".
Root package versions
./package.json
Bumped devDependencies and packageManager to yarn@4.10.3; no code changes.
ESLint config migration
configs/eslint-config-custom/eslint.config.base.js, configs/eslint-config-custom/eslint.config.typescript.js, configs/eslint-config-custom/eslint.config.yaml.js
Replaced typescript-eslint config wrapper with defineConfig from eslint/config; added typedefs and userConfig normalization in the TypeScript config.
ESLint config package versions
configs/eslint-config-custom/package.json
Upgraded ESLint/Prettier/TypeScript-related devDependencies (version bumps only).
Vite config package: packaging & scripts
configs/vite-config-custom/package.json, configs/vite-config-custom/eslint.config.js
Switched to dist-based main/typings/exports, added build/lint scripts and eslint-config-custom devDependency; added small ESLint re-export module.
Vite config package: TS configs
configs/vite-config-custom/tsconfig.json, configs/vite-config-custom/tsconfig.lib.json, configs/vite-config-custom/tsconfig.node.json
Added project tsconfigs for lib/node builds with outDir, rootDir, and tsBuildInfoFile settings and references.
Vite config source typing
configs/vite-config-custom/src/index.ts, configs/vite-config-custom/index.d.ts
Strengthened TypeScript types for NodeConfig/builders and removed prior index.d.ts public API file.
Examples: ESLint & TS updates
examples/react-babel/eslint.config.js, examples/react-swc/eslint.config.js, examples/react-swc/tsconfig.app.json, examples/react-swc/tsconfig.node.json, examples/react-babel/package.json, examples/react-swc/package.json
Migrated example ESLint files to defineConfig, adjusted parserOptions/rootDir/globs, added TS compiler options, and bumped example deps.
TS project references added
tsconfig.json, packages/*/tsconfig.json
Added project reference to configs/vite-config-custom across multiple package tsconfigs and root tsconfig.json.
Package version bumps (libs)
packages/*/package.json (babel, css, debug-log, esbuild, integration, react, transform-to-vanilla, vite)
Incremented various dependencies/devDependencies (Babel, esbuild, vanilla-extract, vite, etc.); no source changes.
CI action tweaks
.github/actions/node-setup/action.yml
In strict branch added install/audit/check steps and adjusted non-strict install flags.

Sequence Diagram(s)

(Skipped — changes are configuration, dependency bumps, and type/signature updates without new runtime control flow.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

dependencies, config/build

Poem

I hopped through configs, tiny paws so fleet,
defineConfig for lint made my nose twitch sweet.
Carrots packed in dist, TypeScript snug in rows,
Yarn and Turbo nudged — the garden grows.
Thump-thump — a rabbit’s cheer for tidy repos! 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description fails to follow the repository’s template; it is missing the required “Description” section and contains no actual content under any of the headings, leaving all sections empty placeholders for reviewer guidance. Please add a “Description” section summarizing the PR changes, fill out the “Related Issue” section if applicable, provide relevant details under “Additional context,” and include concrete checklist items to guide reviewers.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly identifies the primary change—migrating the vite-config-custom module into a TypeScript package—while remaining concise and specific without listing file details or using vague terms.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bump-packages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
examples/react-swc/eslint.config.js (1)

11-11: Simplify the PACKAGE_ROOT definition.

resolve(cwd()) is redundant since cwd() already returns an absolute path. The resolve function with a single argument simply normalizes the path, which is unnecessary here.

Apply this diff:

-const PACKAGE_ROOT = resolve(cwd());
+const PACKAGE_ROOT = cwd();
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc7dd88 and 4fc3ac8.

⛔ Files ignored due to path filters (2)
  • .yarn/releases/yarn-4.10.3.cjs is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (38)
  • .yarnrc.yml (1 hunks)
  • configs/eslint-config-custom/eslint.config.base.js (1 hunks)
  • configs/eslint-config-custom/eslint.config.typescript.js (2 hunks)
  • configs/eslint-config-custom/eslint.config.yaml.js (1 hunks)
  • configs/eslint-config-custom/package.json (1 hunks)
  • configs/vite-config-custom/eslint.config.js (1 hunks)
  • configs/vite-config-custom/index.d.ts (0 hunks)
  • configs/vite-config-custom/package.json (1 hunks)
  • configs/vite-config-custom/src/index.ts (2 hunks)
  • configs/vite-config-custom/tsconfig.json (1 hunks)
  • configs/vite-config-custom/tsconfig.lib.json (1 hunks)
  • configs/vite-config-custom/tsconfig.node.json (1 hunks)
  • examples/react-babel/eslint.config.js (1 hunks)
  • examples/react-babel/package.json (1 hunks)
  • examples/react-swc/eslint.config.js (2 hunks)
  • examples/react-swc/package.json (1 hunks)
  • examples/react-swc/tsconfig.app.json (2 hunks)
  • examples/react-swc/tsconfig.node.json (1 hunks)
  • package.json (2 hunks)
  • packages/babel/package.json (1 hunks)
  • packages/babel/tsconfig.json (1 hunks)
  • packages/css-additional-types/tsconfig.json (1 hunks)
  • packages/css/package.json (1 hunks)
  • packages/css/tsconfig.json (1 hunks)
  • packages/debug-log/package.json (1 hunks)
  • packages/debug-log/tsconfig.json (1 hunks)
  • packages/esbuild/package.json (1 hunks)
  • packages/esbuild/tsconfig.json (1 hunks)
  • packages/integration/package.json (1 hunks)
  • packages/integration/tsconfig.json (1 hunks)
  • packages/react/package.json (1 hunks)
  • packages/react/tsconfig.json (1 hunks)
  • packages/transform-to-vanilla/package.json (1 hunks)
  • packages/transform-to-vanilla/tsconfig.json (1 hunks)
  • packages/vite/package.json (1 hunks)
  • packages/vite/tsconfig.json (1 hunks)
  • tsconfig.json (1 hunks)
  • turbo.json (1 hunks)
💤 Files with no reviewable changes (1)
  • configs/vite-config-custom/index.d.ts
🧰 Additional context used
🧬 Code graph analysis (18)
packages/esbuild/tsconfig.json (1)
configs/vite-config-custom/index.js (3)
  • code (68-84)
  • initCommonBuilder (113-153)
  • NodeBuilder (28-111)
configs/vite-config-custom/tsconfig.json (1)
configs/vite-config-custom/index.js (2)
  • initCommonBuilder (113-153)
  • NodeBuilder (28-111)
packages/babel/tsconfig.json (1)
configs/vite-config-custom/index.js (1)
  • code (68-84)
packages/babel/package.json (1)
packages/integration/src/babel.ts (1)
  • babelTransform (18-39)
configs/vite-config-custom/tsconfig.node.json (1)
configs/vite-config-custom/index.js (3)
  • code (68-84)
  • NodeBuilder (28-111)
  • initCommonBuilder (113-153)
packages/debug-log/tsconfig.json (1)
configs/vite-config-custom/index.js (2)
  • code (68-84)
  • NodeBuilder (28-111)
examples/react-swc/tsconfig.app.json (1)
packages/integration/src/compile.ts (2)
  • setup (59-82)
  • compile (18-99)
packages/react/tsconfig.json (1)
configs/vite-config-custom/index.js (1)
  • code (68-84)
packages/vite/tsconfig.json (1)
configs/vite-config-custom/index.js (3)
  • code (68-84)
  • initCommonBuilder (113-153)
  • NodeBuilder (28-111)
packages/react/package.json (1)
packages/babel/src/styled.ts (1)
  • styledComponentPlugin (13-103)
packages/css/tsconfig.json (1)
configs/vite-config-custom/index.js (1)
  • code (68-84)
configs/vite-config-custom/eslint.config.js (1)
configs/eslint-config-custom/eslint.config.typescript.js (1)
  • eslintConfig (18-70)
packages/integration/tsconfig.json (1)
configs/vite-config-custom/index.js (1)
  • code (68-84)
packages/integration/package.json (3)
packages/integration/src/compile.ts (2)
  • setup (59-82)
  • compile (18-99)
packages/esbuild/src/index.ts (1)
  • setup (30-129)
packages/integration/src/babel.ts (1)
  • babelTransform (18-39)
configs/vite-config-custom/tsconfig.lib.json (1)
configs/vite-config-custom/index.js (3)
  • NodeBuilder (28-111)
  • initCommonBuilder (113-153)
  • code (68-84)
configs/vite-config-custom/package.json (2)
packages/vite/src/index.ts (2)
  • transform (163-284)
  • minchoVitePlugin (72-286)
configs/vite-config-custom/index.js (3)
  • code (68-84)
  • initCommonBuilder (113-153)
  • NodeBuilder (28-111)
tsconfig.json (1)
configs/vite-config-custom/index.js (2)
  • code (68-84)
  • initCommonBuilder (113-153)
packages/transform-to-vanilla/tsconfig.json (1)
configs/vite-config-custom/index.js (1)
  • code (68-84)
🔇 Additional comments (31)
packages/css/package.json (1)

90-90: LGTM! Dependency version bump aligns with ecosystem updates.

The patch version bump from ^1.17.2 to ^1.17.4 for @vanilla-extract/css is a safe update that maintains backward compatibility.

packages/transform-to-vanilla/package.json (1)

65-65: LGTM! Consistent version bump across the monorepo.

The @vanilla-extract/css update to ^1.17.4 maintains consistency with other packages in this PR.

packages/integration/package.json (1)

55-59: LGTM! Dependency updates align with ecosystem.

The version bumps look appropriate:

  • @babel/core minor bump (7.27→7.28) should maintain backward compatibility
  • @vanilla-extract/integration and esbuild patch bumps are safe
configs/vite-config-custom/tsconfig.node.json (1)

1-14: LGTM! Node configuration properly isolates build artifacts.

The configuration correctly:

  • Extends the base node config from tsconfig-custom
  • Isolates build cache to .cache/typescript/tsbuildinfo-node
  • Includes eslint.config.js for tooling support
  • Excludes build output directories
examples/react-babel/eslint.config.js (1)

1-1: LGTM! Modern ESLint flat config API adoption.

The migration to defineConfig from eslint/config aligns with ESLint's modern flat config best practices and provides better TypeScript support.

Based on learnings

Also applies to: 8-8

packages/esbuild/package.json (1)

56-59: LGTM! Coordinated dependency updates.

The patch version bumps for esbuild, @vanilla-extract/esbuild-plugin, and @vanilla-extract/integration are safe updates that align with the broader ecosystem updates across the monorepo.

configs/vite-config-custom/tsconfig.lib.json (1)

1-9: LGTM! Library build configuration properly structured.

The configuration correctly:

  • Extends the base TypeScript config
  • Sets output directory to ./dist for publishable artifacts
  • Defines source root as ./src
  • Isolates build cache to .cache/typescript/tsbuildinfo-esm
  • References the src directory for compilation

This aligns with the Vite build process that references tsconfig.lib.json for generating library outputs.

packages/debug-log/package.json (1)

74-74: Chalk bump to v5.6.2 is safe
v5.5.0 adds Ghostty true-color support, v5.6.0 adds WezTerm support, and v5.6.2 patches a security issue; no breaking changes or deprecations.

turbo.json (1)

82-82: LGTM! Typo fix in global dependencies.

The correction from "packages.json" to "package.json" ensures that Turbo properly tracks changes to the root package.json file for cache invalidation.

examples/react-swc/package.json (1)

14-34: LGTM! Dependency updates consistent with other packages.

The version bumps align with updates across the repository. Same verification applies as noted for the react-babel example regarding Vite 7.x and ESLint 9.37.0 breaking changes.

configs/eslint-config-custom/eslint.config.yaml.js (1)

3-3: LGTM! ESLint config API migration.

The migration from typescript-eslint's config function to ESLint's native defineConfig aligns with the modern flat config approach and is consistent with the ESLint 9.x upgrade across the repository.

Based on learnings: This change follows the recommended pattern for ESLint 9.37.0, which emphasizes flat config stability and TypeScript config support.

Also applies to: 8-8

package.json (2)

5-5: LGTM! Yarn package manager update.

The Yarn update from 4.9.2 to 4.10.3 is a patch version update, which should be safe and include bug fixes.


50-72: All workspace devDependency versions align with the root package.

packages/react/package.json (1)

70-72: Approve version bumps React@19.2.0, React-DOM@19.2.0, and @vanilla-extract/css@1.17.4 exist and have no documented breaking changes.

packages/vite/package.json (1)

65-65: Confirm @types/node bump from v22 to v24. There is no v23; v24.7.0 is the next available version—verify your codebase type checks with @types/node v24.7.0.

packages/babel/package.json (1)

57-57: Approve Babel dependency version bumps

Versions ^7.28.4 for @babel/core and @babel/traverse, and ^7.28.0 for @types/babel__traverse are valid on npm and no security advisories were found.

configs/eslint-config-custom/eslint.config.base.js (1)

2-6: LGTM! Clean migration to native ESLint defineConfig.

The migration from tseslint.config(...) to defineConfig(...) from eslint/config aligns with ESLint 9.x flat config best practices. The config content remains unchanged, ensuring behavioral consistency.

Based on learnings.

configs/eslint-config-custom/eslint.config.typescript.js (3)

11-12: Good addition of type definitions.

The Config and ConfigArray typedefs improve type safety for the normalization logic. Using eslint.Linter.Config is the correct approach for ESLint 9.x flat config types.


19-21: LGTM! Normalization logic handles all input cases correctly.

The normalization ensures userConfigs is always an array before spreading into defineConfig(...). It correctly handles arrays (pass-through), single configs (wrap in array), and null/undefined (default to empty config object).


23-68: Migration to defineConfig looks correct.

The switch to defineConfig(...) and spreading normalizedUserConfigs completes the migration pattern. The config content remains functionally identical while leveraging the new normalization step for type safety.

Based on learnings.

tsconfig.json (1)

5-7: Project reference addition looks correct.

The addition of the vite-config-custom project reference at the root level is consistent with the broader pattern of adding this reference across multiple packages in the repository. The configuration itself is syntactically correct.

Ensure the verification requested in packages/integration/tsconfig.json review confirms the target is properly configured.

configs/eslint-config-custom/package.json (1)

20-31: Approve dependency version bumps. All specified versions exist and are compatible with each other.

packages/debug-log/tsconfig.json (1)

4-6: LGTM: reference wiring

Adding the vite-config-custom reference here is consistent with the repo-wide graph. No issues.

packages/css/tsconfig.json (1)

4-6: LGTM: reference added

The new vite-config-custom project reference is consistent with other packages. Ensure no cycles with transform-to-vanilla during tsc -b.

packages/transform-to-vanilla/tsconfig.json (1)

4-6: LGTM: reference added

Reference to configs/vite-config-custom looks correct.

packages/babel/tsconfig.json (1)

4-6: LGTM: reference added

Consistent with monorepo-wide TS project graph updates.

packages/esbuild/tsconfig.json (1)

4-6: LGTM: reference added

Matches the new shared config package; build order should improve with tsc --build.

packages/vite/tsconfig.json (1)

4-6: LGTM: reference added

Consistent with centralizing Vite config typing/builds across packages.

configs/vite-config-custom/eslint.config.js (1)

1-2: LGTM!

The simple re-export pattern is clean and aligns with the ESLint config approach used across the repository.

configs/vite-config-custom/package.json (1)

6-15: LGTM!

The package manifest updates properly configure the package for dist-based publishing with appropriate exports field and type definitions.

configs/vite-config-custom/src/index.ts (1)

5-36: LGTM!

The TypeScript typing improvements strengthen type safety across the public API. The type aliases TInputConfig and TOutputConfig are well-derived from the upstream library types, and the explicit function signatures provide better IDE support and compile-time checks.

Comment on lines +1 to +7
{
"files": [],
"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.lib.json" }
]
} No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Make the referenced project composite (required for TS project references)

This tsconfig is referenced by multiple packages. TypeScript requires referenced projects to be composite. Add compilerOptions.composite: true (or update dependents to reference a composite child like tsconfig.lib.json).

Apply:

 {
-  "files": [],
-  "references": [
-    { "path": "./tsconfig.node.json" },
-    { "path": "./tsconfig.lib.json" }
-  ]
+  "files": [],
+  "compilerOptions": {
+    "composite": true
+  },
+  "references": [
+    { "path": "./tsconfig.node.json" },
+    { "path": "./tsconfig.lib.json" }
+  ]
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"files": [],
"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.lib.json" }
]
}
{
"files": [],
"compilerOptions": {
"composite": true
},
"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.lib.json" }
]
}
🤖 Prompt for AI Agents
configs/vite-config-custom/tsconfig.json lines 1-7: the referenced projects must
be composite for TypeScript project references to work; add a compilerOptions
section with "composite": true to this tsconfig (or alternatively update
dependent configs to reference an already-composite child like
tsconfig.lib.json). Ensure the file includes "compilerOptions": { "composite":
true } at top-level so TypeScript can validate and build project references.

Comment on lines +38 to +51
"@eslint/js": "^9.37.0",
"@types/babel__core": "^7.20.5",
"@types/cssesc": "^3.0.2",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.6",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.1",
"@types/scheduler": "^0.26.0",
"@vitejs/plugin-react": "^4.5.1",
"eslint": "^9.28.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.2.0",
"typescript": "~5.8.3",
"typescript-eslint": "^8.33.1",
"vite": "^6.3.5"
"@vitejs/plugin-react": "^5.0.4",
"eslint": "^9.37.0",
"eslint-plugin-react-hooks": "^6.1.1",
"eslint-plugin-react-refresh": "^0.4.23",
"globals": "^16.4.0",
"typescript": "~5.9.3",
"typescript-eslint": "^8.46.0",
"vite": "^7.1.9"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Verify major version bumps in dev tooling.

Several significant version updates were made:

  • Vite: ^6.3.5 → ^7.1.9 (major version bump)
  • ESLint: ^9.28.0 → ^9.37.0 (9 minor versions)
  • TypeScript: ~5.8.3 → ~5.9.3

Ensure the Vite 7.x migration is documented and tested, as major version bumps typically include breaking changes. Verify that ESLint rule changes don't introduce new violations.

Run the following script to check for breaking changes:

Additionally, please search the web for Vite 7.x migration guide:


🏁 Script executed:

#!/bin/bash
# Description: Check for breaking changes and changelogs

echo "=== Vite 7.x changelog ==="
npm view vite@7.1.9 --json | jq '{version, description}'

echo "=== ESLint 9.37.0 features ==="
npm view eslint@9.37.0 --json | jq '{version, description}'

echo "=== TypeScript 5.9.3 release notes ==="
npm view typescript@5.9.3 --json | jq '{version}'

Length of output: 295


🌐 Web query:

What are the breaking changes in Vite 7.0 and how to migrate from Vite 6.x?

💡 Result:

Short summary of breaking changes in Vite 7 and how to migrate from Vite 6.x.

Breaking changes (high‑impact items)

  • Node requirement: Node 20.19+ or 22.12+ (Node 18 dropped). [1]
  • Vite is ESM‑only (no CJS build). [2]
  • Default build target changed from "modules" to "baseline-widely-available" (minimum browser targets bumped: Chrome → 107, Edge → 107, Firefox → 104, Safari → 16.0). You may need to adjust build.target if you support older browsers. [1][2]
  • Sass: legacy Sass API support removed — Vite always uses the modern Sass compiler API. Update any code/config that relied on the legacy API. [3]
  • Removed splitVendorChunkPlugin (and other deprecated plugins/APIs like HotBroadcaster, deprecated hook-level enforce/transform in transformIndexHtml). [3]
  • Removed some experimental SSR/transforms/options (e.g., experimental.skipSsrTransform) and other low‑level API removals — check plugins/framework integrations for compatibility. [3]
  • Vitest: Vite 7 requires newer Vitest (Vitest 3.2+ for full support of testing environments). [1]

Minimal migration checklist (recommended)

  1. Upgrade Node on your dev/CI machines to 20.19+ or 22.12+. Test CI images. [1]
  2. Update dependency: npm/yarn pnpm upgrade vite@^7.0.0.
  3. Adjust build.target if you need older browser support (explicitly set build.target to your desired target). Test production builds and browsers. [1][2]
  4. Remove/replace splitVendorChunkPlugin usage (it was removed). [3]
  5. Update any Sass usage/config to the modern Sass API; remove any legacy Sass options. [3]
  6. Update plugins and framework integrations to versions compatible with Vite 7 (look for plugin releases that state Vite 7 support). Fix code that uses removed experimental/internal APIs (search for errors about removed hooks/options). [3]
  7. Upgrade Vitest to 3.2+ if you use Vitest. Run tests. [1]
  8. Run a full dev + build + SSR (if applicable) smoke test and fix plugin/API breakages reported by Vite. Consult plugin author notes for changes to Environment API or SSR integration. [1][2]
  9. Read Vite 7 changelog/migration guide and your project’s CI/build logs for any further deprecations/errors and follow their suggested fixes. [1][2]

Key references

  • Vite 7 announcement (release notes + migration summary). [1]
  • Vite Breaking Changes / Changes page (list of removals & planned items). [2]
  • Vite 7 changelog / PR summary with removed items (splitVendorChunkPlugin, Sass legacy removal, Node bump, etc.). [3]

If you want, I can:

  • scan your package.json / vite.config.* and list exact changes needed for your project, or
  • produce a one‑click migration script (Node + dependency updates + common replacements). Which would you prefer?

Address Vite v7 migration and ESLint/TS updates.

  • Upgrade Node in CI/dev to ≥20.19.
  • Convert to ESM-only config (remove CJS usage).
  • Set build.target explicitly if you support older browsers (default now “baseline-widely-available”).
  • Remove splitVendorChunkPlugin and other deprecated Vite 6 APIs in your vite.config.*.
  • Update Sass configuration to use the modern Sass compiler API.
  • Upgrade Vitest to ≥3.2 if you run tests under Vite.
  • Run full dev, build, and SSR (if used) smoke tests; fix any plugin/API breakages.
  • Run ESLint 9.37.0 and address any new lint violations.
  • Confirm TypeScript 5.9.3 introduces no type errors.
🤖 Prompt for AI Agents
In examples/react-babel/package.json around lines 38 to 51: update project and
tooling to Vite v7 and related ESLint/TypeScript requirements by ensuring CI/dev
Node is >=20.19, converting any Vite config files to ESM-only (remove CommonJS
usage), explicitly set build.target in vite.config to the desired browser
baseline, remove deprecated Vite 6 APIs such as splitVendorChunkPlugin and
replace with supported alternatives, update Sass configuration to use the modern
Dart Sass compiler API, upgrade Vitest to >=3.2 if tests run under Vite, run
full dev/build/SSR smoke tests and fix plugin/API breakages, run ESLint 9.37.0
and resolve reported lint issues, and validate TypeScript 5.9.3 produces no type
errors before committing.

Comment on lines +47 to +49
extends: [
"react-hooks/recommended"
]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Incorrect placement of extends in flat config.

In ESLint flat config format, extends is not a valid property within individual config objects. To extend the react-hooks recommended config, you should spread its rules directly or use the plugin's recommended configuration in the top-level array.

Apply this diff to fix the config structure:

     plugins: {
       "react-refresh": reactRefreshPlugin,
       "react-hooks": reactHooksPlugin,
     },
     rules: {
+      ...reactHooksPlugin.configs.recommended.rules,
       "react-refresh/only-export-components": [
         "warn",
         { allowConstantExport: true },
       ],
     },
-    extends: [
-      "react-hooks/recommended"
-    ]
   },

Alternatively, if the plugin exports a flat config, you can spread it at the top level of the defineConfig array.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
extends: [
"react-hooks/recommended"
]
plugins: {
"react-refresh": reactRefreshPlugin,
"react-hooks": reactHooksPlugin,
},
rules: {
...reactHooksPlugin.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
},
🤖 Prompt for AI Agents
In examples/react-swc/eslint.config.js around lines 47-49, the flat ESLint
config incorrectly uses an "extends" property inside an object; remove that
"extends" entry and instead spread the plugin's recommended flat config at the
top level of the defineConfig array (or require/spread the plugin's exported
config). Concretely: delete the extends block, and either add
require('eslint-plugin-react-hooks').configs.recommended (or its ESM import) as
an item in the exported config array or spread its rules into your top-level
config object so the react-hooks recommended rules are applied correctly.

Comment on lines +4 to +6
{
"path": "../../configs/vite-config-custom"
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify referenced project is composite to avoid tsc --build failures

Referencing a project requires the target tsconfig to have compilerOptions.composite: true. Please confirm configs/vite-config-custom is composite (or point references at a composite child like tsconfig.lib.json).

Run to check:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Check composite in configs/vite-config-custom/tsconfig.json"
rg -n '"composite"\s*:\s*true' configs/vite-config-custom/tsconfig.json || echo "composite not set in aggregator"

echo "Check composite/out dirs in child configs"
for f in configs/vite-config-custom/tsconfig.node.json configs/vite-config-custom/tsconfig.lib.json; do
  echo "== $f =="
  rg -n '"composite"\s*:\s*true' "$f" || echo "Missing composite"
  rg -n '"outDir"\s*:\s*' "$f" || echo "Missing outDir"
done

Length of output: 338


Enable composite in configs/vite-config-custom/tsconfig.json
Add "composite": true to the referenced project’s tsconfig (or point the reference at a child config with composite enabled) to avoid tsc --build failures.

🤖 Prompt for AI Agents
In packages/css-additional-types/tsconfig.json around lines 4 to 6, the project
reference to "../../configs/vite-config-custom" points to a tsconfig that lacks
"composite": true which causes tsc --build failures; update the referenced
project's tsconfig (configs/vite-config-custom/tsconfig.json) to include
"composite": true, or create and point to a child tsconfig in that directory
which sets "composite": true (and preserves any needed
"references"/"files"/"include") so the referenced project is buildable with
project references.

Comment on lines +4 to +6
{
"path": "../../configs/vite-config-custom"
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the vite-config-custom TypeScript project is properly configured.

The new project reference to ../../configs/vite-config-custom requires that the target directory contains a tsconfig.json with "composite": true enabled for TypeScript project references to work correctly.

Run the following script to verify the configuration:


🏁 Script executed:

#!/bin/bash
# Verify vite-config-custom is properly configured as a TypeScript project

TARGET_DIR="configs/vite-config-custom"

echo "Checking if tsconfig.json exists..."
if [ -f "$TARGET_DIR/tsconfig.json" ]; then
  echo "✓ tsconfig.json found"
  
  echo "Checking for composite flag..."
  if jq -e '.compilerOptions.composite == true' "$TARGET_DIR/tsconfig.json" > /dev/null 2>&1; then
    echo "✓ composite: true is set"
  else
    echo "✗ WARNING: composite flag is not set to true"
    echo "Project references require composite: true in the target tsconfig"
  fi
  
  echo "Current tsconfig.json content:"
  cat "$TARGET_DIR/tsconfig.json"
else
  echo "✗ ERROR: $TARGET_DIR/tsconfig.json not found"
  echo "TypeScript project references require a tsconfig.json in the target directory"
fi

Length of output: 349


Enable "composite": true in configs/vite-config-custom/tsconfig.json
Add a "compilerOptions": { "composite": true } section to that tsconfig so the project reference is valid.

🤖 Prompt for AI Agents
In packages/integration/tsconfig.json around lines 4 to 6, the referenced
project "../../configs/vite-config-custom" lacks "composite": true in its
tsconfig, so the project reference is invalid; open
configs/vite-config-custom/tsconfig.json and add a "compilerOptions" object
containing "composite": true (or merge into existing compilerOptions) and save
so the referenced project can be used as a TypeScript project reference.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

Triggered from #253 by @​black7375.

Checking if we can fast forward main (bc7dd88) to bump-packages (50bc9d0).

Target branch (main):

commit bc7dd88d744fe292db499108074d2a06c49a2063 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Aug 16 00:00:00 2025 +0900

    Refactor: `styled` code order & naming

Pull request (bump-packages):

commit 50bc9d0ea0acada8bfd11e19d458db420055984e (pull_request/bump-packages)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Fri Sep 12 00:00:00 2025 +0900

    Chore(Bump): deps

It is possible to fast forward main (bc7dd88) to bump-packages (50bc9d0). If you have write access to the target repository, you can add a comment with /fast-forward to fast forward main to bump-packages.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
examples/react-swc/eslint.config.js (1)

47-49: Remove invalid extends from flat config.

Flat configs ignore extends, so the react-hooks recommended preset never loads. Inline the preset’s rules instead so the hook checks stay active.

     plugins: {
       "react-refresh": reactRefreshPlugin,
       "react-hooks": reactHooksPlugin,
     },
     rules: {
+      ...reactHooksPlugin.configs.recommended.rules,
       "react-refresh/only-export-components": [
         "warn",
         { allowConstantExport: true },
       ],
     },
-    extends: [
-      "react-hooks/recommended"
-    ]
   },
🧹 Nitpick comments (1)
configs/vite-config-custom/src/index.ts (1)

18-36: Consider verifying the type cast.

Line 34 casts extendConfigs as ViteUserConfig. While this enables flexibility, ensure all valid TInputConfig values are compatible with ViteUserConfig to avoid runtime type mismatches.

If the types are always compatible, consider adjusting TInputConfig to ensure type safety without the cast:

-type TInputConfig = Parameters<typeof defineConfig>[0];
+type TInputConfig = ViteUserConfig | Promise<ViteUserConfig>;

Then remove the cast:

-    extendConfigs as ViteUserConfig
+    extendConfigs
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4fc3ac8 and 50bc9d0.

⛔ Files ignored due to path filters (2)
  • .yarn/releases/yarn-4.10.3.cjs is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (27)
  • .github/actions/node-setup/action.yml (1 hunks)
  • .yarnrc.yml (1 hunks)
  • configs/eslint-config-custom/eslint.config.base.js (1 hunks)
  • configs/eslint-config-custom/eslint.config.typescript.js (2 hunks)
  • configs/eslint-config-custom/eslint.config.yaml.js (1 hunks)
  • configs/eslint-config-custom/package.json (1 hunks)
  • configs/vite-config-custom/eslint.config.js (1 hunks)
  • configs/vite-config-custom/package.json (1 hunks)
  • configs/vite-config-custom/src/index.ts (2 hunks)
  • configs/vite-config-custom/tsconfig.json (1 hunks)
  • configs/vite-config-custom/tsconfig.lib.json (1 hunks)
  • configs/vite-config-custom/tsconfig.node.json (1 hunks)
  • examples/react-babel/eslint.config.js (1 hunks)
  • examples/react-babel/package.json (1 hunks)
  • examples/react-swc/eslint.config.js (2 hunks)
  • examples/react-swc/package.json (1 hunks)
  • examples/react-swc/tsconfig.app.json (2 hunks)
  • examples/react-swc/tsconfig.node.json (1 hunks)
  • package.json (2 hunks)
  • packages/babel/package.json (1 hunks)
  • packages/css/package.json (1 hunks)
  • packages/debug-log/package.json (1 hunks)
  • packages/esbuild/package.json (1 hunks)
  • packages/integration/package.json (1 hunks)
  • packages/react/package.json (1 hunks)
  • packages/transform-to-vanilla/package.json (1 hunks)
  • packages/vite/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
  • examples/react-babel/package.json
  • packages/css/package.json
  • packages/debug-log/package.json
  • examples/react-swc/package.json
  • examples/react-swc/tsconfig.node.json
  • configs/vite-config-custom/package.json
  • configs/vite-config-custom/tsconfig.json
  • packages/esbuild/package.json
  • configs/vite-config-custom/eslint.config.js
  • packages/vite/package.json
  • packages/react/package.json
  • .yarnrc.yml
  • configs/vite-config-custom/tsconfig.lib.json
  • configs/eslint-config-custom/eslint.config.yaml.js
🧰 Additional context used
🧬 Code graph analysis (3)
packages/integration/package.json (1)
packages/integration/src/compile.ts (2)
  • setup (59-82)
  • compile (18-99)
configs/vite-config-custom/src/index.ts (1)
configs/vite-config-custom/index.js (3)
  • initCommonBuilder (113-153)
  • NodeBuilder (28-111)
  • NodeConfig (14-16)
packages/babel/package.json (1)
packages/integration/src/babel.ts (1)
  • babelTransform (18-39)
🔇 Additional comments (12)
packages/transform-to-vanilla/package.json (1)

65-65: LGTM!

Patch version bump of @vanilla-extract/css aligns with similar updates across the monorepo.

packages/integration/package.json (1)

55-59: LGTM!

Coordinated minor/patch updates for @babel/core, @vanilla-extract/integration, and esbuild align with broader monorepo dependency refresh.

packages/babel/package.json (1)

57-66: LGTM!

Coordinated Babel package updates with properly aligned type definitions.

package.json (2)

5-5: Verify package manager compatibility.

Yarn updated from 4.9.2 to 4.10.3. Ensure all contributors update their local Yarn versions.


54-72: Add Node engine constraint and verify Vite 7.x upgrade

  • Add an "engines": { "node": ">=18" } field to package.json and ensure CI/CD uses that Node version
  • Review the Vite 7.x migration guide (e.g. https://github.com/vitejs/vite/releases/tag/v7.0.7) for breaking changes and validate all plugins/configs
  • Confirm @types/node 24 introduces no runtime-breaking changes ([verify CI/CD Node versions])
.github/actions/node-setup/action.yml (2)

38-43: Excellent CI/CD improvements!

Added validation steps enhance supply chain security:

  • yarn check:pkgs validates peer dependencies and constraints
  • yarn npm audit --all catches known vulnerabilities
  • Echo statements improve pipeline observability

45-45: LGTM!

YARN_ENABLE_HARDENED_MODE=0 with --no-immutable appropriately relaxes validation for non-strict scenarios.

configs/vite-config-custom/src/index.ts (3)

1-16: Excellent type safety improvements!

Added explicit TypeScript typings strengthen the config API:

  • TInputConfig and TOutputConfig provide clear type aliases
  • ConfigEnv from Vite ensures proper environment typing
  • Type inference from defineConfig and mergeConfig maintains type safety

39-122: LGTM!

Function signatures properly typed with ConfigEnv. The builder pattern implementation remains clean and maintainable.


124-164: LGTM!

initCommonBuilder properly typed and provides consistent configuration across environments.

examples/react-babel/eslint.config.js (1)

1-8: LGTM!

Migration to defineConfig from eslint/config aligns with ESLint 9.x best practices and ensures proper type inference. Based on learnings.

configs/eslint-config-custom/eslint.config.base.js (1)

2-6: LGTM!

Consistent migration to defineConfig pattern across ESLint configuration files. This ensures type safety and aligns with ESLint 9.37.0 recommendations. Based on learnings.

Comment on lines +31 to +33
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.css.ts"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Re-include *.d.ts files in the project.

By narrowing the include globs to only .ts, .tsx, and .css.ts, we now exclude src/**/*.d.ts files (e.g., src/vite-env.d.ts). Those declaration files provide ambient types like import.meta, so TypeScript will start erroring once they fall out of the program. Please add the .d.ts pattern back (or revert to the previous "src" include) to keep those definitions in scope.

   "include": [
     "src/**/*.ts",
     "src/**/*.tsx",
+    "src/**/*.d.ts",
     "src/**/*.css.ts"
   ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.css.ts"
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.d.ts",
"src/**/*.css.ts"
]
🤖 Prompt for AI Agents
In examples/react-swc/tsconfig.app.json around lines 31 to 33, the include globs
exclude declaration files (src/**/*.d.ts) which removes ambient types like
import.meta; restore them by adding "src/**/*.d.ts" to the include array (or
revert the include to simply "src") so declaration files remain part of the
program and TypeScript errors stop occurring.

@black7375
Copy link
Contributor Author

/fast-forward

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

Triggered from #253 (comment) by @​black7375.

Trying to fast forward main (bc7dd88) to bump-packages (50bc9d0).

Target branch (main):

commit bc7dd88d744fe292db499108074d2a06c49a2063 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Aug 16 00:00:00 2025 +0900

    Refactor: `styled` code order & naming

Pull request (bump-packages):

commit 50bc9d0ea0acada8bfd11e19d458db420055984e (pull_request/bump-packages)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Fri Sep 12 00:00:00 2025 +0900

    Chore(Bump): deps

Fast forwarding main (bc7dd88) to bump-packages (50bc9d0).

$ git push origin 50bc9d0ea0acada8bfd11e19d458db420055984e:main
To https://github.com/mincho-js/mincho.git
   bc7dd88..50bc9d0  50bc9d0ea0acada8bfd11e19d458db420055984e -> main

@github-actions github-actions bot merged commit 50bc9d0 into main Oct 8, 2025
12 checks passed
@github-actions github-actions bot deleted the bump-packages branch October 8, 2025 16:01
This was referenced Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant