A barrel module imports and re-exports several child modules to create a single import point. It is useful for grouping related features. It becomes an anti-pattern when it re-exports everything indiscriminately, groups unrelated modules for convenience, or triggers unnecessary recompilation of all consumers on any child module change.
Re-exporting everything — exposes internal implementation details that should stay private.
Grouping unrelated modules — creates false cohesion and obscures the real dependency graph.
Large monorepo barrels — every change to a child module triggers recompilation of all barrel consumers.
Use barrels only for genuine bounded contexts; only re-export the public surface, not every internal module.