↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Web dependencies are broken. Can we fix them?

The post argues that the web platform has outsourced basic dependency management to third-party tooling, which turns a normal task into a usability cliff. Bundlers are acceptable for optimization, but they should not be required just to use a dependency.

It reviews the main workarounds for using dependencies without bundlers, including raw node_modules imports, CDN imports, local copies, browser bundles, and import maps. Each approach is shown to trade away encapsulation, reliability, locality, or scalability, especially once dependencies themselves depend on other packages.

Reading notes
#

  • Dependency management should be first-class in the platform, not something handled only by bundlers.
  • Bundlers are fine for performance optimization, but not as the default answer for basic dependency use.
  • Raw node_modules imports are wasteful, fragile, and break package encapsulation.
  • CDN imports add security risk, failure points, and local-development friction.
  • Copying packages or exports locally still breaks encapsulation and does not handle transitive dependencies.
  • Browser bundles avoid specifiers but just move bundling into the library itself.
  • Import maps currently require awkward HTML-level management and do not compose well across dependencies.
  • The post suggests improving import maps, making them external or injectable, and exploring server-side handling of specifier resolution.
  • It also sketches a broader idea: treating specifiers as a URL-like primitive that the server can resolve.