liveBook · Manning

Dependency

As explained in Vanilla Web

A dependency is an external software component required by an application or another software component to build or operate.

A dependency is an external software component an application needs to build or run. In frontend projects, dependencies can accumulate through frameworks, libraries, and build tools. A large dependency tree makes it harder to know what external code is shipped with the application. section 2.5.1 section 2.5.4

The practical question is not whether a project has many files, but who controls them. A vanilla web project may contain hundreds of well-organized files while relying on fewer third-party packages. Removing dependencies does not remove the need for maintainable structure or style guidelines. section 2.5.1

Fewer dependencies can reduce several operational costs:

  • Security and reliability exposure: a malicious or broken npm package can affect many projects or prevent a build. section 2.5.1
  • Build and debugging complexity: framework builds may merge dozens or hundreds of packages into shipped code. section 2.5.4
  • Maintenance work: package audits, upgrades, large node_modules caches, and aging build chains can demand attention long after a feature is finished. section 2.5.4

Choose external components against the project’s requirements. Browser-native HTML, JavaScript, and APIs can eliminate some packages and, for a simple starting point, the need for Node.js/npm or a build step. Keep the code organized either way; fewer dependencies are a reduction in external moving parts, not a substitute for design. section 2.5.1 section 2.5.4

How Vanilla Web covers it

How deep it goes
Explains operational consequences of large dependency trees, but does not provide package-selection or auditing procedures.
Examples
Uses a malicious or buggy npm dependency, large node_modules caches, package-upgrade demands, and an aging build chain as examples.
What it assumes
Starts vanilla development without requiring Node.js/npm, a build step, or a development server.
What you can do after
Evaluate/understand the security and maintenance costs of dependencies when choosing between external packages and browser-native implementations.
How it connects
Connects dependencies to npm, node_modules, build tools, browser APIs, web standards, and project organization.

Also explained in

Compare how 35 books explain dependency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vanilla Web. The section links point to the parts of the book it draws on.