Registry / web-framework / resource-bundler

resource-bundler

JSON →
library0.0.8jsnpmunverified

A simple asset bundler for Express applications, inspired by the .NET MVC 4 bundler. It combines multiple CSS or JavaScript files into single bundles with optional minification via custom transformers. Version 0.0.8 is the latest, with low release cadence (no recent updates). Key differentiators: lightweight, Express integration, extensible via custom transformers. Not actively maintained; may have compatibility issues with modern Node.js.

npm install resource-bundler
INSTALL
IMPORT
SIG · RESOURCE-BUNDLER
R
resource-bundler
web-frameworkjavascriptv0.0.8
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.

bundler
import bundler from 'resource-bundler'
const bundler = require('resource-bundler')
Default export; commonjs require works but ESM recommended.
Bundle
import { Bundle } from 'resource-bundler'
const { Bundle } = require('resource-bundler')
Named export for Bundle class.
StyleBundle
import { StyleBundle } from 'resource-bundler'
const StyleBundle = require('resource-bundler').StyleBundle
Named export for CSS bundles.

This shows how to set up Express with resource-bundler, create style and script bundles, and serve them on a route.

import express from 'express'; import bundler from 'resource-bundler'; import { StyleBundle, ScriptBundle } from 'resource-bundler'; const app = express(); const bundle = bundler(app, { production: process.env.NODE_ENV === 'production' }); bundle.add(new StyleBundle('css') .withFiles('public/css/reset.css', 'public/css/main.css')); bundle.add(new ScriptBundle('js') .withFiles('public/js/lib/jquery.js', 'public/js/app.js')); app.get('/', (req, res) => { res.send(` <link href="${bundle.resolve('css')}" rel="stylesheet"> <script src="${bundle.resolve('js')}"></script> `); }); app.listen(3000);
Debug
Known issues
breakingThe package is unmaintained and may not work with Node.js >= 12.
fix
Consider alternatives like webpack or parcel.
affects: >=0.0.8
gotchaBundles are resolved relative to the public directory; incorrect paths may cause 404s.
fix
Ensure file paths are correct and accessible via static middleware.
affects: >=0.0.0
gotchaNo built-in minification; transformers must be added manually.
fix
Use custom transformers with uglify-js or clean-css.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'resource-bundler'
Package not installed or not properly linked.
fix
Run 'npm install resource-bundler' or check package.json dependencies.
TypeError: bundler is not a function
Incorrect import: import { bundler } instead of default import.
fix
Use 'import bundler from "resource-bundler"' (default export).
Error: Bundle 'css' not found
Bundle name mismatch or bundle not added before resolve.
fix
Ensure bundle name matches and bundle is added before calling resolve().
Upgrade
Version history
0.0.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
resource-bundler — npm install resource-bundler · libregistry