Skip to content

A Vite temp-config artifact is committed in packages/plugin-editor, and .gitignore does not cover the pattern #4540

Description

@yinlianghui

Out-of-scope finding, recorded while doing #4006 (PR #4539 — the build tsconfigs of fields / plugin-editor). It turned up on a plain ls of the package root, not from any measurement in that card, and it is not fixed there.

Labelled finding, not queued. Nothing is broken today: builds and tests are green, and the file cannot affect either (see below). This is repo hygiene plus a missing ignore rule.

Fact

One tracked file in the whole repo matches Vite's temp-config naming:

$ git ls-files | grep 'timestamp-[0-9]*-'
packages/plugin-editor/vite.config.ts.timestamp-1768467704562-21cdd04a7c5ed.mjs

4368 bytes. Added in 39b03a1 ("Add CanvasDesigner mode with free-form absolute positioning", 2026-01-15, copilot-swe-agent[bot]) — swept in by a broad git add, not authored.

It is the bundled form Vite writes next to a config while loading it, and it is frozen at the moment it was captured: it still carries absolute paths from a CI runner (/home/runner/work/objectui/objectui/node_modules/.pnpm/...), and it pins vite@5.4.21, @vitejs/plugin-react@4.7.0, vite-plugin-dts@3.9.1. The repo is now on vite@8.2.1 / plugin-react@6.0.5 / vite-plugin-dts@5.0.3, so the content is about seven months and three majors stale.

It also embeds a snapshot of the config as it was then, which no longer matches vite.config.ts: the live config aliases twelve @object-ui/* specifiers to sibling sources and passes compilerOptions / aliasesExclude to the dts plugin; the frozen copy has a single @ alias and a bare dts({ insertTypesEntry, include }).

Why it is inert

So the cost is a reader stumbling on a stale second copy of a config and having to work out which one is live — plus the ignore gap below, which is the part that can recur.

The reusable half: .gitignore has no rule for it

$ git check-ignore -v packages/plugin-editor/vite.config.ts.timestamp-...mjs
(no output — NOT ignored)

Vite writes these on every config load and normally removes them, but a crashed or killed process leaves one behind; nothing stops the next broad git add from committing it again. A single root rule would close that:

*.timestamp-*.mjs

Adjacent but distinct from #3592 (__dirname in 28 vite/vitest configs) — that one is about the live configs' contents, this one is about a stale artifact sitting beside one, so it is filed separately rather than as a comment there.

Suggested shape, if it is ever picked up

Delete the file and add the ignore rule; both are one-liners and belong together, since deleting without the rule leaves the recurrence path open. Worth confirming first that nothing references the path (a grep at the time of this filing finds no reference).


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions