Skip to content

feat(utils): inline utils instead of reexporting @dfinity/utils#866

Merged
peterpeterparker merged 2 commits into
mainfrom
feat/duplicate
Apr 3, 2026
Merged

feat(utils): inline utils instead of reexporting @dfinity/utils#866
peterpeterparker merged 2 commits into
mainfrom
feat/duplicate

Conversation

@peterpeterparker

@peterpeterparker peterpeterparker commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

I want dev to not know about @dfinity/utils as they do not know about @dfinity/zod-schemas.

If I just reexport I get quite a drawback in terms of bundle size, for example the core worker double (tested in #865).

Therefore, I'll remove the re-export and cherry pick / duplicate few utils. The additional weight is around 5kb which I guess is acceptable to improve the story and also actually reduce the size of most libs because of tree shaking I guess as seen in #865 which is actually great.

@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@junobuild/admin 7.44 KB (0%)
@junobuild/core 16.86 KB (0%)
@junobuild/core-worker 21.88 KB (0%)
@junobuild/core-standalone 71.35 KB (-5.11% 🔽)
@junobuild/utils 5.17 KB (-90.4% 🔽)
@junobuild/errors 992 B (0%)
@junobuild/functions 3.72 KB (0%)
@junobuild/analytics 12.33 KB (0%)
@junobuild/config 7.15 KB (0%)
@junobuild/auth/delegation 3.93 KB (0%)
@junobuild/auth/automation 2.18 KB (0%)
@junobuild/cdn 2.32 KB (0%)
@junobuild/storage 2.39 KB (0%)
@junobuild/ic-client/actor 8.78 KB (0%)
@junobuild/ic-client/webauthn 3.39 KB (0%)
@junobuild/ic-client/utils 174 B (0%)
@junobuild/ic-client/index 62 B (0%)

@peterpeterparker
peterpeterparker merged commit 6c039fe into main Apr 3, 2026
9 checks passed
@peterpeterparker
peterpeterparker deleted the feat/duplicate branch April 3, 2026 07:18
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.

1 participant