Skip to content

Conversation

@7emansell
Copy link

@7emansell 7emansell commented Feb 5, 2026

Why I think this is a necessary add...for posterity:
Currently, this package reads from whatever’s at config/{env}.yaml at runtime and decrypts that. Unfortunately, Vercel and Next.js serverless functions only bundle files that are statically referenced at build time. Also unfortunately, YAML files can’t be imported and parsed in Node/TS (unless we add a YAML loader either here or in the consuming app– which just adds another step to this solution).

Tried writing/copying a YAML file at runtime, tried to override the bundling decisions in Vercel, did not work.

So to work in Vercel, this package needs to allow the configuration to be loaded from a statically importable object.

Because this feels very unintuitive, I think the consuming app should still have to register this about its environment, supply the config object, and use the object loader specifically (in RC, by checking process.env.VERCEL and passing the JSON) rather than silently allowing this as the fallback. (Maybe it being unintuitive is actually an argument in favor of the fallback?)

Release candidate tested in Vercel here, see logs showing that only the JSON is making it into the bundle

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