Summary
Add correct sideEffects metadata to Askable packages and single-export consumer bundle fixtures so importing one component/hook does not retain unrelated adapter modules.
Evidence
The React package exports dozens of runtime modules but does not declare sideEffects. A verified esbuild fixture importing only Askable measured:
| Import shape |
Minified |
gzip |
Askable from package root |
5,825 B |
1,534 B |
direct dist/Askable.js |
329 B |
266 B |
package graph with temporary sideEffects: false |
329 B |
261 B |
This is a fast, compatible first phase of the broader lightweight-runtime work in #367.
Proposed fix
- Add
"sideEffects": false to packages with no import-time registration.
- Treat
@askable-ui/web-component separately: split definition from registration or use a precise side-effect allow-list.
- Add representative bundle fixtures for core and every framework adapter.
Acceptance criteria
Summary
Add correct
sideEffectsmetadata to Askable packages and single-export consumer bundle fixtures so importing one component/hook does not retain unrelated adapter modules.Evidence
The React package exports dozens of runtime modules but does not declare
sideEffects. A verified esbuild fixture importing onlyAskablemeasured:Askablefrom package rootdist/Askable.jssideEffects: falseThis is a fast, compatible first phase of the broader lightweight-runtime work in #367.
Proposed fix
"sideEffects": falseto packages with no import-time registration.@askable-ui/web-componentseparately: split definition from registration or use a precise side-effect allow-list.Acceptance criteria