Registry / devops / packle

packle

JSON →
library0.2.12jsnpmunverified

Packle is a JavaScript and TypeScript bundler similar to Webpack, Parcel, or Vite, designed to be straightforward and reliable with minimal configuration. The current stable version is 0.2.12, and it uses Bun as its runtime and package manager. It supports bundling for browser and Node.js targets, automatic entry point detection (index.html, index.ts, etc.), CSS/SCSS handling, file copying, watch mode, and production mode with minification. Key differentiators include zero-config simplicity, support for importing JSON, TOML, and text files as inlined modules, and a tiny codebase with no hidden complexity. However, it requires Bun to be installed and is still in early development with potential instability.

npm install packle
INSTALL
IMPORT
SIG · PACKLE
P
packle
devopsjavascriptv0.2.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

packle (command-line tool)
bun add --dev packle
npm install --save-dev packle
Package requires Bun; npm/yarn installation will fail or produce unexpected results.
Configuration (packle.config.json)
import config from './packle.config.json' assert { type: 'json' };
CommonJS require shows config type as JSON object.
Environment variables
console.log(process.env.MY_VAR);
process.env variables are replaced at bundle time; requires .env file to be present.

Shows basic setup: install packle via Bun, create src/index.ts and src/index.html, and run bun packle to bundle.

# Ensure Bun is installed: curl -fsSL https://bun.sh/install | bash # Create a new directory and init project mkdir my-packle-project cd my-packle-project bun init -y # Install packle as dev dependency bun add --dev packle@0.2.12 # Create entry files mkdir src cat > src/index.html <<EOF <!DOCTYPE html> <html> <head><title>Packle Demo</title></head> <body> <div id="root"></div> <script src="/bundle.js"></script> </body> </html> EOF cat > src/index.ts <<EOF const greeting: string = 'Hello, Packle!'; document.getElementById('root')!.innerText = greeting; EOF # Run packle (bundles to ./public by default) bun packle # Output: ./public/index.html and ./public/bundle.js
Debug
Known issues
breakingPackle requires Bun runtime; not compatible with Node.js or npm/yarn.
fix
Install Bun (https://bun.sh) and use `bun add --dev packle` and `bun packle`.
affects: >=0.0.0
gotchaWatch mode monitors only 'src' folder, package.json, and packle.config.json. Source code outside these may not trigger rebuild.
fix
Keep all source files under 'src' or manually trigger rebuild by pressing 'p'.
affects: >=0.0.0
gotchaWhen target is 'node', packle generates a temporary tsconfig and runs tsc. Additional typing files must be declared in 'jsEntries'.
fix
Add your .d.ts files to 'jsEntries' in packle.config.json.
affects: >=0.0.0
deprecatedNo known deprecations yet; version 0.x is unstable and APIs may change.
affects: 0.x
Errors
Common errors & fixes
bun: command not found
Bun is not installed on the system.
fix
Install Bun: curl -fsSL https://bun.sh/install | bash
error: Could not resolve "serve"
The serve package is not installed (optional but used in docs).
fix
Run `bun add --dev serve` or use any static server.
TypeError: Cannot read properties of undefined (reading 'root')
document.getElementById('root') returns null because element not in HTML.
fix
Ensure your HTML has an element with id 'root'.
Error: No entry point found. Expected src/index.ts, src/index.tsx, src/index.js, or src/index.jsx
Missing entry file under src/.
fix
Create src/index.ts or one of the expected entry files.
Upgrade
Version history
0.2.12latest on npm
Audit
Dependencies
bunrequiredRequired runtime and package manager for development; packle must be run with Bun.
Agent activity
6 hits · last 30 days
node
6
Resources
packagepackle
packle — npm install packle · libregistry