Dependency hell appears when a component grows beyond one file and consumers must track its scripts, styles, markup, and nested components. A page with one component containing eight more, each with several children, turns dependency ordering and inclusion into a maintenance task. section 5.1
The practical warning signs are:
- Separating markup, controller logic, and styles across files without hiding those requirements from consumers. section 5.1
- Managing custom Web Components nested inside other custom Web Components. section 5.1
Reducing the consumer's dependency list
A photo carousel initially needs photocarousel.js and photocarousel.css. Moving the CSS into the component's innerHTML lets the consumer load only photocarousel.js, while the component manages its own styling.
