fix(build): externalize datavis deps in tsup config#159
Conversation
chore: release v0.3.0
Deploying ui with
|
| Latest commit: |
b81a19c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://672f78ed.ui-6d0.pages.dev |
| Branch Preview URL: | https://release-v0-3-0.ui-6d0.pages.dev |
There was a problem hiding this comment.
Pull request overview
This PR updates the library build configuration to keep DataVis-related dependencies out of the bundled output, and bumps the package version for the v0.3.0 release.
Changes:
- Expanded
tsupexternallist to exclude DataVis-related packages (and related subpaths) from bundling. - Bumped
@mieweb/uipackage version from0.2.4to0.3.0.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tsup.config.ts | Externalizes additional DataVis-related modules/subpaths to avoid bundling them into the published build. |
| package.json | Updates package version to 0.3.0 for the release. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| '@mieweb/datavis', | ||
| 'datavis-ace', | ||
| /^@mieweb\/ui\//, | ||
| /^datavis\//, |
There was a problem hiding this comment.
external now includes datavis-related modules (e.g. @mieweb/datavis, datavis-ace, and datavis/*). Anything listed here will not be bundled, so consumers importing @mieweb/ui/datavis must have the corresponding packages installed at runtime. Right now package.json only declares datavis-ace as a peerDependency (and does not declare datavis or @mieweb/datavis), which can lead to runtime resolution errors for consumers. Consider aligning peerDependencies/peerDependenciesMeta with the modules being externalized (or otherwise ensure the datavis entry point doesn’t require undeclared externals).
| '@mieweb/datavis', | |
| 'datavis-ace', | |
| /^@mieweb\/ui\//, | |
| /^datavis\//, | |
| 'datavis-ace', | |
| /^@mieweb\/ui\//, |
There was a problem hiding this comment.
The suggested change would reintroduce the build failure — removing these externals causes tsup to attempt bundling @mieweb/datavis (a local workspace package in datavis), which in turn imports @mieweb/ui/components/*, creating a circular resolution error.
Adding @mieweb/datavis as a peerDependency is also not viable — it's not published to npm, so pnpm install --frozen-lockfile fails in CI trying to resolve it from the registry.
The datavis entry point is an opt-in internal integration (same pattern as ag-grid). Consumers who use @mieweb/ui/datavis must have the local @mieweb/datavis and datavis-ace packages available — this is by design and documented. The external entries are purely a build-time concern to prevent circular bundling.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chore: release v0.3.0