Skip to content

chore: tune tsdown configuration to reduce bundle size#5

Merged
fjakobs merged 2 commits intomainfrom
improve-bundle-size
Dec 8, 2025
Merged

chore: tune tsdown configuration to reduce bundle size#5
fjakobs merged 2 commits intomainfrom
improve-bundle-size

Conversation

@fjakobs
Copy link
Copy Markdown
Collaborator

@fjakobs fjakobs commented Dec 5, 2025

Reduced bundle size dramatically by not bundling node dependencies.

Before:

-rw-r--r--  1 fabian.jakobs  staff   966K Dec  5 11:33 databricks-app-kit-0.0.1.tgz
-rw-r--r--  1 fabian.jakobs  staff   127K Dec  5 11:33 databricks-app-kit-ui-0.0.1.tgz

After:

-rw-r--r--  1 fabian.jakobs  staff    88K Dec  5 11:32 databricks-app-kit-0.0.1.tgz
-rw-r--r--  1 fabian.jakobs  staff    68K Dec  5 11:32 databricks-app-kit-ui-0.0.1.tgz

@fjakobs fjakobs requested review from a team and MarioCadenas December 5, 2025 11:02
Copy link
Copy Markdown
Collaborator

@MarioCadenas MarioCadenas left a comment

Choose a reason for hiding this comment

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

Lets go! 🚀

@fjakobs fjakobs force-pushed the improve-bundle-size branch from 72e92ff to c04265c Compare December 5, 2025 16:39
Modified the external function in tsdown configs to properly handle @/ path aliases:
- Added check to prevent @/ imports from being treated as external dependencies
- This allows tsdown to resolve these paths to actual file paths during bundling
- Applied to both @databricks/app-kit and @databricks/app-kit-ui packages

The issue was that the regex /^[^./]/ was marking all non-relative imports
(including @/ aliases) as external, preventing proper resolution.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Fabian Jakobs <fabian.jakobs@databricks.com>
@fjakobs fjakobs merged commit 747f62f into main Dec 8, 2025
3 checks passed
@MarioCadenas MarioCadenas deleted the improve-bundle-size branch December 19, 2025 17:44
@pkosiec pkosiec mentioned this pull request Apr 2, 2026
4 tasks
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