Skip to content

chore: update rollup config#291

Open
yvonneyx wants to merge 1 commit into
v5from
chore/deps
Open

chore: update rollup config#291
yvonneyx wants to merge 1 commit into
v5from
chore/deps

Conversation

@yvonneyx

@yvonneyx yvonneyx commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an esm distribution target to the package, updating package.json exports and scripts, and refactoring rollup.config.mjs to output ESM builds to both lib and esm directories. It also adds dynamic external package detection. The review feedback correctly points out that TypeScript declaration files (.d.ts) are currently only generated for the lib directory, which will cause compilation errors for consumers importing from the new esm path. The dtsConfig output should be updated to target both directories.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread rollup.config.mjs
preserveModules: true,
preserveModulesRoot: 'src',
},
external: isExternal,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Since this PR introduces the esm directory as a distribution target (and exposes it in package.json exports), the TypeScript declaration files (.d.ts) should also be generated for the esm directory. Currently, dtsConfig only outputs to lib, which will cause TypeScript compilation errors for consumers importing from @antv/layout/esm/* due to missing type definitions. Please update the output property of dtsConfig to be an array containing both lib and esm outputs, similar to esmConfig.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.00%. Comparing base (62bb479) to head (2435dda).

Additional details and impacted files
@@           Coverage Diff           @@
##               v5     #291   +/-   ##
=======================================
  Coverage   86.00%   86.00%           
=======================================
  Files          77       77           
  Lines        5946     5946           
  Branches     1444     1437    -7     
=======================================
  Hits         5114     5114           
  Misses        831      831           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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