{"id":18750,"library":"resource-bundler","title":"resource-bundler","description":"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.","status":"abandoned","version":"0.0.8","language":"javascript","source_language":"en","source_url":"git://github.com/UROSEMI/bundler","tags":["javascript","asset","resource","manager","bundle","express","connect"],"install":[{"cmd":"npm install resource-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add resource-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add resource-bundler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export; commonjs require works but ESM recommended.","wrong":"const bundler = require('resource-bundler')","symbol":"bundler","correct":"import bundler from 'resource-bundler'"},{"note":"Named export for Bundle class.","wrong":"const { Bundle } = require('resource-bundler')","symbol":"Bundle","correct":"import { Bundle } from 'resource-bundler'"},{"note":"Named export for CSS bundles.","wrong":"const StyleBundle = require('resource-bundler').StyleBundle","symbol":"StyleBundle","correct":"import { StyleBundle } from 'resource-bundler'"}],"quickstart":{"code":"import express from 'express';\nimport bundler from 'resource-bundler';\nimport { StyleBundle, ScriptBundle } from 'resource-bundler';\n\nconst app = express();\nconst bundle = bundler(app, { production: process.env.NODE_ENV === 'production' });\n\nbundle.add(new StyleBundle('css')\n  .withFiles('public/css/reset.css', 'public/css/main.css'));\n\nbundle.add(new ScriptBundle('js')\n  .withFiles('public/js/lib/jquery.js', 'public/js/app.js'));\n\napp.get('/', (req, res) => {\n  res.send(`\n    <link href=\"${bundle.resolve('css')}\" rel=\"stylesheet\">\n    <script src=\"${bundle.resolve('js')}\"></script>\n  `);\n});\n\napp.listen(3000);","lang":"javascript","description":"This shows how to set up Express with resource-bundler, create style and script bundles, and serve them on a route."},"warnings":[{"fix":"Consider alternatives like webpack or parcel.","message":"The package is unmaintained and may not work with Node.js >= 12.","severity":"breaking","affected_versions":">=0.0.8"},{"fix":"Ensure file paths are correct and accessible via static middleware.","message":"Bundles are resolved relative to the public directory; incorrect paths may cause 404s.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use custom transformers with uglify-js or clean-css.","message":"No built-in minification; transformers must be added manually.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install resource-bundler' or check package.json dependencies.","cause":"Package not installed or not properly linked.","error":"Cannot find module 'resource-bundler'"},{"fix":"Use 'import bundler from \"resource-bundler\"' (default export).","cause":"Incorrect import: import { bundler } instead of default import.","error":"TypeError: bundler is not a function"},{"fix":"Ensure bundle name matches and bundle is added before calling resolve().","cause":"Bundle name mismatch or bundle not added before resolve.","error":"Error: Bundle 'css' not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}