Recipes

Short, complete patterns for common Guchho tasks.

#

Each page here is one task, solved end to end: the command or configuration, the reasoning behind it, and the parts that surprise people. They are meant to be copied and adapted rather than read in order.

For the exhaustive list of what a flag or a field does, follow the link on each page into the reference; these pages are about when to reach for it.

Recipe You want to
Scaffold a project start from a working tree instead of an empty directory.
Build a single-page app go from index.html to a deployable dist/.
Build a library publish ESM and CommonJS with the dependencies left external.
Serve and watch edit a file and see the page update, with the right command of the three.
Analyze bundle size see what is big and why, without a second tool.
Inject configuration at build time replace an identifier such as process.env.NODE_ENV in the output.
Mangle property names shorten obj.longPropertyName safely and keep it stable between builds.
Transform single files turn one source through stdin into stdout.
Pack a distribution produce a versioned archive of the output.

See also

#

Edit this page on GitHub