ISSUE DESCRIPTION False positive unused file for Vercel vercel.ts config What happened?…
- User
ISSUE DESCRIPTION
False positive unused file for Vercel vercel.ts config
What happened?
fallow dead-codereportsapps/web/vercel.tsas an unused file, but Vercel treatsvercel.tsas a project configuration file that is discovered and executed by convention.The file is not imported by application source, so it looks unused to a pure import graph. It should be treated as a Vercel config entrypoint.
Vercel docs say:
vercel.tsconfigures and overrides Vercel project behavior.- Unlike
vercel.json,vercel.tsexecutes at build time. - The final config must be exported as
config. - Vercel also supports
vercel.js,vercel.mjs,vercel.cjs, andvercel.mts.
The
@vercel/configpackage also treatsvercel.tsas the config input:packages/config/README.mdsays to create avercel.tsfile in the project root.packages/config/README.mdsaysvercel.tsis automatically compiled duringvercel build,vercel dev, andvercel deploy.packages/config/src/cli.tsresolvesprocess.cwd()/vercel.ts.packages/config/src/cli.tsimports the config module and collects named exports.
- Assistant
I’ll trace the Vercel plugin’s configuration and existing “always used” patterns, then update the smallest relevant source/config and add no repository tests. I’ll run targeted tests or type checks, inspect the diff, and verify that all requested extensions are covered without affecting non-Vercel projects.
- Assistant
rgis unavailable in this environment, so I’ll usegrep/findinstead. The repository is Rust-based; I’m narrowing the search to plugin implementations and fixture/test locations before editing. - Assistant
There is no existing Vercel plugin, so merely extending an existing framework would incorrectly depend on (for example) Next.js. I’ll add a dedicated built-in plugin activated by either
vercelor@vercel/config, with exact root-level config patterns for all five documented extensions. Itsconfig_patternsandalways_usedentries will ensure the files are both discovered and protected when that tooling is present. - Assistant
The targeted plugin test suite passes (1,012 tests). The new file was untracked and therefore absent from the first diff summary, but it is now present and compiled. I’ll perform an end-to-end temporary workspace check using the CLI, then inspect formatting/status to confirm only the intended three source changes are submitted.
- Assistant
The end-to-end check confirms the behavior: with only
@vercel/configindevDependencies,vercel.tsis not reported, while an unrelatedunused.tsis reported. The check also confirms plugin activation and entry-point detection. I’ll run the final formatting/diff checks and submit.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.