Skip to content

fix: model registration modules must not be tree-shaken - #37

Merged
ronaldtse merged 1 commit into
mainfrom
fix/side-effects-registration
Aug 26, 2026
Merged

fix: model registration modules must not be tree-shaken#37
ronaldtse merged 1 commit into
mainfrom
fix/side-effects-registration

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

  • "sideEffects": false let esbuild drop the bare import "./models/rababa/index.js" / secryst/index.js in dist/ml/index.js — those side-effect imports are the registerModel calls
  • consequence: any consumer bundling with esbuild/webpack (the api-worker did) silently shipped with zero ML models registered
  • declare the registration modules side-effectful with a targeted glob; tree-shaking elsewhere is unchanged

Test plan

  • CI green
  • consumer bundle now contains createRababaModel (verified in the api-worker rebuild)

…ropping the rababa/secryst registerModel imports
@ronaldtse
ronaldtse merged commit 3bab226 into main Aug 26, 2026
8 checks passed
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