Skip to content

fix: use lodash default import to fix ESM named-export crash#1106

Merged
despock merged 1 commit into
mainfrom
fix/cloudflare-lodash-esm-import
Jun 18, 2026
Merged

fix: use lodash default import to fix ESM named-export crash#1106
despock merged 1 commit into
mainfrom
fix/cloudflare-lodash-esm-import

Conversation

@despock

@despock despock commented Jun 18, 2026

Copy link
Copy Markdown
Member

packages/cloudflare/src/common/construct.ts used a named import import { omit } from 'lodash'. Since the package ships as native ESM ("type": "module", module: nodenext) and lodash is CommonJS, Node's ESM loader cannot resolve the named export at runtime, throwing SyntaxError: Named export 'omit' not found when consuming the published package.

Switched to the default import (import _ from 'lodash' / _.omit(...)), matching every other lodash usage across the monorepo.

Also bumps deps and includes a changeset (patch for cloudflare/azure/aws).

@despock despock merged commit e9b0f84 into main Jun 18, 2026
8 checks passed
@despock despock deleted the fix/cloudflare-lodash-esm-import branch June 18, 2026 21:29
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.

2 participants