JS packaging

Node.js logo

It’s all about containing complexity. Think of node modules as Lego blocks. You don’t necessarily care about the details of how it’s made.

@sindresorhus

How?

npm logo Yarn logo

path

800 000+

request

18 000 000+

CommonJS

require('./voorhoede')
module.exports = { }

ECMAScript

import './voorhoede'
export { }

Please let me code

cd exercise-1; npm init

Automating

yarn set version berry

Conclusion

  1. Package Phobia
  2. BundlePhobia