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 configuration and existing always-used patterns/tests, then implement the smallest convention-aware change. I’ll run targeted tests and a reproduction or equivalent fixture, inspect the diff, and only then submit.
- Assistant
The repository has no Vercel plugin at all, so this is broader than adding a pattern to an existing plugin. I’ll add a focused deployment plugin activated by
vercelor@vercel/configdependencies (and thevercelCLI in scripts), with the five documented config extensions exposed as both config and always-used patterns. Nested patterns preserve behavior for workspace package roots while exact patterns cover the app root. - Assistant
The implementation compiles and all 2,461 core library tests pass. The new file is untracked (as expected for a new plugin), and the registry now includes it. I’ll do one final formatting/status/diff verification and inspect the relevant activation and pattern behavior through the existing registry machinery before submitting.
- Assistant
The final check confirms formatting, no whitespace errors, and the targeted always-used registry test passes. I also tightened the pattern to the project-root form only, matching Vercel’s
process.cwd()/vercel.tsdiscovery and avoiding treating arbitrary nestedvercel.tsfiles as entrypoints. I’ll mark the new file for diff visibility 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.