Knowledgebase

Managing Dependencies and Build Tools Print

  • webdevelopment, caching, guide, howto, solution, zillionkinghost, hosting, support
  • 0

The JavaScript ecosystem.

WHAT A PACKAGE MANAGER DOES

Installs libraries and records exact versions.

WHAT TO COMMIT

The declaration of what you require, and the lock file recording what was installed.

WHY THE LOCK FILE

It guarantees identical versions everywhere.

WHAT NOT TO COMMIT

The installed dependencies directory.

WHAT A BUNDLER DOES

Combines modules into files the browser loads efficiently, and applies transformations.

WHY IT IS NEEDED

Modern code uses features and structures that benefit from processing before delivery.

WHAT ELSE BUILD TOOLING DOES

Compiles newer syntax for older browsers Removes unused code Minifies output Adds version identifiers to filenames

WHY THAT LAST ONE

So caching does not serve an old file after a change.

WHAT TO BE CAREFUL WITH

Dependencies added casually, each bringing its own Very large bundles Build configuration nobody understands

WHAT TO CHECK

The size of what you ship.

WHY

Every added library is downloaded, parsed and executed by every visitor.

WHAT TO REMOVE

Anything unused.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot