Skip to content

fix: resolve ESM-only package exports maps (fixes #1311) - #1344

Draft
QuarkOS wants to merge 1 commit into
vercel:mainfrom
QuarkOS:cursor/fix-esm-import-only-exports-7a6f
Draft

fix: resolve ESM-only package exports maps (fixes #1311)#1344
QuarkOS wants to merge 1 commit into
vercel:mainfrom
QuarkOS:cursor/fix-esm-import-only-exports-7a6f

Conversation

@QuarkOS

@QuarkOS QuarkOS commented Aug 30, 2026

Copy link
Copy Markdown

fixes #1311

ncc fails on packages whose exports map has import/types but no default/require, like @actions/core 3.x.

We add import to CJS conditionNames. require stays first so dual packages still pick CJS.

there is a unit fixture named exports-import-only.

Packages whose exports map has only `import`/`types` (no `require` or
`default`), such as @actions/core 3.x, failed with "Package path . is
not exported" when webpack resolved them as CommonJS.

Include `import` in CJS conditionNames so those packages can be bundled.
`require` stays first so dual packages still prefer their CJS entry when
it is listed first.

Fixes vercel#1311

Co-authored-by: Emilio Schwaiger <QuarkOS@users.noreply.github.com>
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.

github/core package fails build because of exports map

2 participants