Stop using barrel exports in JavaScript
Barrel exports in JavaScript reduce tree shaking effectiveness, hide dependencies and make code harder to maintain. Learn why you should avoid them.
Design notes on explicit dependencies, runtime boundaries, and maintainable JavaScript systems.
Barrel exports in JavaScript reduce tree shaking effectiveness, hide dependencies and make code harder to maintain. Learn why you should avoid them.
Direct access to window, document, navigator and globalThis couples your code to the runtime, makes side effects harder to isolate, and leads to brittle tests.
Explicit dependencies improve clarity and testability. You do not need a framework to achieve that.