False positive unused file for Vercel vercel.ts config What happened? fallow dead-code…
- User
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.- shows the expected shape.
- Assistant
I’ll trace the existing Vercel plugin and its fixture/test conventions, then add the config entrypoint patterns and a regression test.
- Assistant
The repository has no Vercel plugin yet. I’m adding one that activates from either
vercel/@vercel/configdependencies or thevercelCLI in scripts, treats all five documented programmatic config names as project-root inputs, and parses their imports like other executable configs. - Assistant
The plugin-level checks pass. I’m now running the end-to-end CLI regression to confirm the dead-code report still catches a true orphan while excluding every supported
vercel.*variant.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.