Registry / web-framework / pundle-middleware

pundle-middleware

JSON →
library0.2.15jsnpmunverified

Express middleware for Pundle, a JavaScript bundler. Provides development server integration with Express, enabling features like HMR and file serving. The package is part of the Pundle ecosystem, which is an alternative to Webpack. As of version 1.0.0 (stable), it is designed for advanced users. The v2.0.0-alpha1 release includes breaking changes with a complete architecture rebuild. Release cadence is sporadic with major gaps between versions. Differentiators: tight integration with Pundle's modular component system and presets.

npm install pundle-middleware
INSTALL
IMPORT
SIG · PUNDLE-MIDDLEWARE
P
pundle-middleware
web-frameworkjavascriptv0.2.15
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

default
import pundleMiddleware from 'pundle-middleware'
const pundleMiddleware = require('pundle-middleware')
Package is ESM-only from v1.0.0; no CommonJS export.
createMiddleware
import { createMiddleware } from 'pundle-middleware'
import { createMiddleware } from 'pundle-middleware'
The named export exists but is not documented; use default import for reliability.
PundleMiddlewareOptions
import type { PundleMiddlewareOptions } from 'pundle-middleware'
import { PundleMiddlewareOptions } from 'pundle-middleware'
Type import only; not a runtime value. Available in TypeScript.

Shows how to integrate Pundle middleware with Express for HMR and file watching.

import express from 'express'; import pundleMiddleware from 'pundle-middleware'; import { createPundle } from 'pundle'; const app = express(); const pundle = createPundle({ entry: './src/index.js', output: { format: 'esm', dir: './dist' }, }); app.use(pundleMiddleware(pundle, { hmr: true, watch: true, })); app.listen(3000);
Debug
Known issues
breakingv2.0.0-alpha1 completely rebuilt; API is incompatible with v1.x
fix
Check changelog for migration guide; use v1.x if stable required.
affects: >=2.0.0-alpha1 <2.0.0
deprecatedNamed export createMiddleware may be deprecated in favor of default export
fix
Use default import to ensure compatibility.
affects: >=1.0.0
gotchaPackage is ESM-only; using require() will throw Error [ERR_REQUIRE_ESM]
fix
Use import or configure CommonJS interop.
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require with ESM-only package
fix
Switch to import syntax or use dynamic import().
Cannot find module 'pundle'
Pundle core not installed as dependency
fix
Run: npm install pundle
Upgrade
Version history
0.2.15latest on npm
Audit
Dependencies
pundlerequiredCore bundler required for middleware to function
expressrequiredPeer dependency for Express integration
Agent activity
4 hits · last 30 days
node
4
Resources
pundle-middleware — npm install pundle-middleware · libregistry