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 explore the repository structure and find how Vercel and other framework config entrypoints are marked as always-used.
- Assistant
Let me search for Vercel-related plugin code and always-used patterns.
- Assistant
Interesting - no vercel mentions found? Let me search more broadly for plugins and always-used patterns.
- Assistant
Let me look at the plugins directory structure.
- Assistant
There's no dedicated Vercel plugin yet. I'll inspect similar config plugins like Next.js and Wrangler.
- Assistant
I'll inspect how plugins mark always-used config files.
- Assistant
rgseems unavailable now; I'll switch to grep and inspect a simple plugin. - Assistant
Sentry's always-used pattern is the right model. I'll check how plugins are registered and whether Vercel is already referenced.
- Assistant
I need to create a vercel plugin. Let me look at how plugins are registered in builtin.rs and look at nextjs for vercel.json perhaps, and a few similar simple plugins.
- Assistant
Let me read nextjs always_used section and the full builtin.rs registration pattern.
- Assistant
I'll check other deployment plugins and any existing
vercel.jsonhandling. - Assistant
I'll check how
always_usedpatterns resolve in monorepos and look at a simple plugin test fixture. - Assistant
I'll review the OpenNext fixtures and whether used_exports should include
config. - Assistant
I'll inspect how plugin enabling and tooling_dependencies work, and check docs for plugin authoring conventions.
- Assistant
I need to confirm whether built-in
config_patternsare automatically always-used. - Assistant
Checking tooling for always-used configs and how config entry exports are treated.
- Assistant
Checking whether always-used files still get unused-export analysis.
- Assistant
Checking if discovered config files automatically count as always-used.
- Assistant
I'll check how workspace path prefixes apply to always_used patterns.
- Assistant
Checking monorepo layout for OpenNext fixtures and whether Vercel appears in the docs.
- Assistant
Looking at SUPPORT_ENTRY_POINT_PLUGINS - vercel should likely be support role (like config plugins). The OpenNext cloudflare plugin defaults to Support if not in runtime list.
- Assistant
Confirming whether
define_pluginsupportsscript_enablers. - Assistant
Checking file-based plugin activation patterns.
- Assistant
I'll check the plugin completeness test requirements, then implement the Vercel plugin.
- Assistant
Confirming whether type-only imports are extracted, then adding the plugin.
- Assistant
Implementing the Vercel plugin and wiring it into the registry.
- Assistant
The create output looks wrong — I'll verify the file contents.
- Assistant
I'll write the file via the shell instead.
- Assistant
Registering the plugin in
mod.rsandbuiltin.rs. - Assistant
I need to insert mod vercel after mod varlock alphabetically... v comes after u... wait:
- Assistant
Building and running the Vercel plugin unit tests.
- Assistant
Creating a temporary reproduction fixture to verify the fix.
- Assistant
I need the correct CLI arguments.
- Assistant
Continue help for directory option
- Assistant
Use --root
- Assistant
Verifying the plugin activates and that without Vercel deps the file is still reported unused.
- Assistant
Running a broader set of related unit tests to ensure nothing broke.
- Assistant
There's a deployment plugins enablers test that passed — I'll inspect it for completeness.
- Assistant
Checking that the
configexport isn't flagged as unused: - Assistant
I need to confirm whether
submitincludes untracked files —vercel.rsis currently untracked. - Assistant
Extracting how the submit tool discovers changes:
- Assistant
Let me try strings more carefully
- Assistant
I'll use
git add -Nso the new file appears ingit diff. - Assistant
Checking whether workspace packages inherit root plugins for monorepo layouts.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.