{"library":"microbundle","title":"Microbundle","description":"Microbundle is a zero-configuration bundler for small JavaScript libraries, currently at version 0.15.1. Powered by Rollup, it simplifies the build process by automatically generating optimized bundles in multiple formats: CommonJS (CJS), ECMAScript Modules (ESM), Universal Module Definition (UMD), and a 'modern' ESM bundle for contemporary browsers. It supports ESnext features, async/await, multiple entry points, TypeScript out-of-the-box, built-in Terser compression, and gzipped bundle size tracking. While not adhering to a strict release cadence, it receives frequent updates, often in the form of patch releases, indicating active maintenance. Key differentiators include its minimal setup (often just `package.json` configuration) and focus on producing tiny, performant outputs with modern browser targets by default.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install microbundle"],"cli":{"name":"microbundle","version":null}},"imports":["/* Microbundle is a CLI tool. Use via package.json scripts or npx. */","npm run build\n// or\nnpx microbundle","npm run dev\n// (where 'dev' script is 'microbundle watch')\n// or\nnpx microbundle watch"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"{\n  \"name\": \"my-tiny-lib\",\n  \"version\": \"1.0.0\",\n  \"type\": \"module\",\n  \"source\": \"src/index.js\",\n  \"exports\": {\n    \"require\": \"./dist/index.cjs\",\n    \"default\": \"./dist/index.modern.js\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.module.js\",\n  \"unpkg\": \"./dist/index.umd.js\",\n  \"scripts\": {\n    \"build\": \"microbundle\",\n    \"dev\": \"microbundle watch\"\n  },\n  \"devDependencies\": {\n    \"microbundle\": \"^0.15.0\"\n  }\n}\n\n// src/index.js\nexport const greet = (name) => `Hello, ${name}!`;\nexport default function sum(a, b) {\n  return a + b;\n}\n\n// To run: \n// 1. npm install\n// 2. npm run build\n// This will generate dist/index.cjs, dist/index.modern.js, dist/index.module.js, dist/index.umd.js","lang":"javascript","description":"Demonstrates a typical `package.json` setup for Microbundle, defining input/output paths for CJS, ESM, UMD, and modern bundles, along with example source code. Shows how to integrate Microbundle into `npm` scripts for building and watching files.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}