Slide 41
Slide 41 text
UI Library
1. Transpile the source with babel with
es module system as a target, place
it in “lib”. We can even host the “lib”
on a CDN.
2. Bundle and minify the source using
rollup, for cjs/umd module system
and es module system as a target.
Modify the package.json to point to
the proper target systems.
// package.json
{
"name": "js-module-system",
"version": "0.0.1",
...
"main": "dist/index.js", // for
umd/cjs builds
"module": "dist/index.es.js", // for
es build
...
}