Skip to content

Comments

fix: do not follow absolute paths outside job base#568

Open
teemingc wants to merge 5 commits intovercel:mainfrom
teemingc:main
Open

fix: do not follow absolute paths outside job base#568
teemingc wants to merge 5 commits intovercel:mainfrom
teemingc:main

Conversation

@teemingc
Copy link

@teemingc teemingc commented Feb 19, 2026

related to sveltejs/kit#13764 (comment)

SvelteKit stringifies environment variables during build so that it can inject static values into the build output instead of always reading the env vars dynamically. However, @vercel/nft interprets any absolute path as an asset it should add. This causes builds on Vercel's build system to balloon in function size because it traces and bundles paths such as Node, Yarn global, etc. Often, this causes the deployment to fail because the function size exceeds the limit.

This PR ensures asset paths outside the given job base are ignored to help us avoid packaging in system dependencies.

Draft for now because I'm not confident that this fix doesn't break lots of other things

// disregard the `bar` in `export { foo as bar }`
case 'ExportSpecifier':
return false;
return node.name === parent.exported.name;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a drive-by fix. Seems to be more in line with the comment above which checks if it's just export { foo } or aliased

@teemingc teemingc marked this pull request as ready for review February 19, 2026 11:26
@teemingc teemingc requested review from a team, icyJoseph, ijjk and styfle as code owners February 19, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant