Skip to content

Make SDK Resource loading lazy#6822

Merged
vimtor merged 8 commits intodevfrom
fix-local-link-resource
Apr 28, 2026
Merged

Make SDK Resource loading lazy#6822
vimtor merged 8 commits intodevfrom
fix-local-link-resource

Conversation

@vimtor
Copy link
Copy Markdown
Collaborator

@vimtor vimtor commented Apr 28, 2026

Closes #6820

  • Remove sideEffects from sdk/js/package.json which bundlers like Next.js Turbopack ignored, causing Resource env loading to be tree-shaken
  • Introduce createResource() factory in shared.ts that defers env loading until first proxy access (get, has, ownKeys, getOwnPropertyDescriptor)
  • Move Resource construction into runtime-specific modules (node.ts, cloudflare.ts) so Node and Cloudflare each register their own lazy loader

@vimtor vimtor merged commit 202ea54 into dev Apr 28, 2026
1 check passed
@vimtor vimtor deleted the fix-local-link-resource branch April 28, 2026 13:04
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.

Broken links with Next.js

1 participant