Skip to content

Conversation

mguleryuz
Copy link

@mguleryuz mguleryuz commented Sep 17, 2025

Fix for Issue #486

This pull request addresses the issue caused by the Node.js environment incorrectly interpreting ESM exports as CJS exports. This misinterpretation led to problems with process.env, resulting in environment variables not propagating correctly between different contexts.

Changes Made:

  • Updated the build process to out into (dist/esm, dist/cjs, dist/types) hence type exports come from a single source
  • Updated the package.json to use the latest export conventions from npm.
Hence runtime is strictly instructed to use same export throughout the instance

Note:
This might be happening because we are running bun in ts mode in prod, (which is a production ready usecase)

These changes should improve the handling of environment variables and prevent context switching issues.

Copy link

changeset-bot bot commented Sep 17, 2025

⚠️ No Changeset found

Latest commit: 226902d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Sep 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
miniapps-docs Ready Ready Preview Comment Sep 17, 2025 8:05pm

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