Minimal JavaScript/TypeScript bundler with plugin architecture.
npm install @oxog/bundlerimport { bundle } from "@oxog/bundler";
await bundle({
entry: "src/index.ts",
outDir: "dist",
format: ["esm", "cjs"],
treeshake: true,
});npx @oxog/bundler src/index.ts --out dist --format esm,cjs- Zero Runtime Dependencies - Core functionality implemented from scratch
- Plugin Architecture - Extensible micro-kernel design
- ESM & CJS & IIFE Support - Multiple output formats
- Tree Shaking - Dead code elimination
- Circular Dependency Detection - Identifies and handles module cycles
- External Dependency Support - Exclude external packages from bundle
- Dynamic Import Support - Parse and handle
import()expressions - Side Effect Detection - Analyze code for side effects
- AST-Based Parsing - Uses Acorn for accurate import/export detection
- Fast Build Performance - Efficient module resolution and graph traversal
- Watch Mode - Incremental rebuilds
- Path Aliases - Custom module resolution paths
- Multiple Entry Points - Bundle multiple files
- Code Splitting - Automatic and manual chunking (partial)
- TypeScript - Built-in type stripping and transpilation
- CSS Bundling - Native CSS processing and extraction
- Source Maps - Source map generation
- Minification - Code optimization with terser
Create a bundler.config.ts file:
import { defineConfig } from "@oxog/bundler";
export default defineConfig({
entry: "src/index.ts",
outDir: "dist",
format: ["esm", "cjs"],
treeshake: true,
external: ["lodash"],
alias: {
"@": "./src",
},
});MIT © 2026 Ersin Koc
- GitHub: https://github.com/ersinkoc/bundler
- Documentation: https://bundler.oxog.dev