The easiest way to bundle your project using cush
.
cush <main> -o <dest> -t <platform> [-p]
The platform
may exist in dest
instead of being
specified separately. The only difference is the bundle path.
cush index.js -o bundle.web.js
# almost identical to:
cush index.js -o bundle.js -t web
The -p
flag minifies the bundle and exits after the first build.
Additionally, the bundle name has a content hash. This is known as
the "production" bundle.