Skip to content

adbayb/quickbundle

Repository files navigation


📦 Quickbundle

The zero-configuration bundler powered by ESBuild


✨ Features

Quickbundle allows you to bundle a library in a quick, fast and easy way:

  • Fast build and watch mode thanks to esbuild
  • Zero configuration: define the build artifacts in your package.json and you're all set!
  • Support of multiple module formats including cjs & esm
  • JavaScript, TypeScript, JSX, CSS, JSON, Image and Text support following esbuild support
  • TypeScript declaration file (.d.ts) generation with bundling support
  • Bundling can be done for several platform targets including browser or node
  • Optimized build with automatic dependency inclusion (peerDependencies and dependencies are not bundled in the final output)

🚀 Quickstart

1️⃣ Install by running:

# Npm
npm install quickbundle
# Pnpm
pnpm add quickbundle
# Yarn
yarn add quickbundle

2️⃣ Set up your package configuration (package.json):

{
	"name": "lib", // Package name
	"source": "src/index.ts", // Source code entrypoint
	"main": "./dist/index.cjs", // CommonJS output file
	"module": "./dist/index.mjs", // ESM output file
	"types": "./dist/index.d.ts", // Typing output file (if defined, can increase build time)
	"platform": "node", // Platform target (optional, by default "browser")
	"scripts": {
		"build": "quickbundle build", // Production mode (optimizes bundle)
		"watch": "quickbundle watch" // Development mode (watches each file change)
	}
}

3️⃣ Try it by running:

# Npm
npm run build
# Pnpm
pnpm build
# Yarn
yarn build

🤩 Used by

  • @adbayb/scripts My opinionated toolbox for JavaScript/TypeScript projects

Contribution welcomed! 🤗


💙 Acknowledgements


📖 License

MIT