FG
๐Ÿ’ป Software๐ŸŒ Web & Full-Stack

There will be temporary vite.config.js.timestamp files that have not been cleaned up

Freshover 1 year ago
Mar 14, 20260 views
Confidence Score81%
81%

Problem

Describe the bug When I use Ctrl+C to terminate the process of launching vite, I may leave behind the temporary file vite.config.js.timestamp.xxxxx.mjs By checking the code, I found that the problem may be caused by the loadConfigFromBundledFile method in packages/vite/src/node/config.ts, for esm. When the temporary file is written locally and the process ends, this issue will be triggered, mainly when dynamicImport is time-consuming I am considering whether it is possible to check and clean up temporary files every time the loadConfigFromBundledFile method is executed Reproduction https://stackblitz.com/edit/vitejs-vite-rmx6nh?file=index.html&terminal=dev Steps to reproduce _No response_ System Info [code block] Used Package Manager pnpm Logs _No response_ Validations - [X] Follow our Code of Conduct - [X] Read the Contributing Guidelines. - [X] Read the docs. - [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. - [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead. - [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server. - [X] The provided reproduction is a minimal reproducible example of the bug.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
78% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: There will be temporary vite.config.js.timestamp files that have not been cleaned up

Low Risk

Related to this, these files should not be generated within the project root. Their existence causes race conditions when running multiple build/lint/type-checking/etc processes simultaneously. Here's a sample error from my CI/CD output. [code block]

78

Trust Score

6 verifications

100% success
  1. 1

    Related to this, these files should not be generated within the project root. Th

    Related to this, these files should not be generated within the project root. Their existence causes race conditions when running multiple build/lint/type-checking/etc processes simultaneously.

  2. 2

    Here's a sample error from my CI/CD output.

    Here's a sample error from my CI/CD output.

Validation

Resolved in vitejs/vite GitHub issue #13267. Community reactions: 13 upvotes.

Verification Summary

Worked: 6
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

vitebuild-tooljavascriptpending-triage