Skip to content

fix(cli): correct module entrypoint#3758

Open
Pugsin wants to merge 1 commit into
apify:masterfrom
Pugsin:codex/fix-cli-module-entry
Open

fix(cli): correct module entrypoint#3758
Pugsin wants to merge 1 commit into
apify:masterfrom
Pugsin:codex/fix-cli-module-entry

Conversation

@Pugsin

@Pugsin Pugsin commented Jun 17, 2026

Copy link
Copy Markdown

Description

@crawlee/cli currently advertises ./dist/index.mjs as the ESM/module entry, but the TypeScript build emits dist/index.js and dist/index.d.ts only. During publish, scripts/copy.ts rewrites dist/ out of the copied manifest, so this becomes a published ./index.mjs pointer that is not present in the npm tarball.

This PR points module and the exports["."].import condition at ./dist/index.js, matching the emitted file and the existing main/require entry.

Verification

  • npm pack @crawlee/cli@3.17.0 --json
  • confirmed the published tarball contains package/index.js and package/index.d.ts
  • confirmed the published tarball does not contain package/index.mjs, despite current module/exports.import pointing there after publish rewrite
  • node assertion that packages/cli/package.json now has module and exports["."].import set to ./dist/index.js
  • git diff --check

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