Tutorial of how to author a library using Webpack.
This library exposes functionality to transalte numbers to words. It is trivial code but the aim is to bundle it using webpack.
- Bundling library code into all library targets ie CommonJS, AMD, ES2015 exports, UMD.
- Having
lodash
as an external dependency.
mkdir webpack-numbers
cd webpack-numbers
mkdir src
touch webpack.config.js src/index.js src/ref.json
npm init -y
npm install --save-dev lodash webpack webpack-cli