{"id":18646,"library":"pallet-bundler","title":"Pallet Bundler","description":"Pallet is a zero-config JavaScript bundler that processes an HTML entry point and automatically bundles linked JS and CSS into separate files. Version 1.0.12 is the latest stable release with infrequent updates. It offers a simple CLI with options for entry, output directory, and file naming, plus a config file for customization. Unlike webpack or Parcel, Pallet focuses on minimal setup and HTML-first bundling, making it suitable for small static sites or prototyping.","status":"active","version":"1.0.12","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install pallet-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add pallet-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add pallet-bundler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"CLI argument parsing","package":"commander","optional":false}],"imports":[{"note":"Exports a single bundle function for programmatic use; no default export.","wrong":"const pallet = require('pallet-bundler')","symbol":"pallet bundler","correct":"import { bundle } from 'pallet-bundler'"},{"note":"The CLI is invoked via npx or global install; no programmatic CLI export.","wrong":"npm run pallet","symbol":"Pallet CLI","correct":"npx pallet"},{"note":"Config file uses CommonJS, not ES modules.","wrong":"export default { ... }","symbol":"Config file","correct":"module.exports = { ... }"}],"quickstart":{"code":"mkdir my-project && cd my-project\necho '<html><head><link rel=\"stylesheet\" href=\"style.css\"></head><body><script src=\"script.js\"></script></body></html>' > index.html\necho 'body { background: red; }' > style.css\necho 'console.log(\"hello\");' > script.js\nnpm install -g pallet-bundler\npallet -e index.html -d dist\nls dist/","lang":"javascript","description":"Creates a simple project with HTML, CSS, and JS files, then bundles them into a dist folder using CLI."},"warnings":[{"fix":"Use module.exports instead of export default.","message":"Config file must be named pallet.config.js and use CommonJS module.exports.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure all local references are relative and correct.","message":"All linked assets in HTML are bundled; external URLs may be inlined or ignored.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Backup your dist folder or use a different output dir.","message":"Output directory is created if not exists, but may overwrite existing files without warning.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Specify entry with -e flag or ensure index.html exists.","message":"Entry point is index.html by default; if missing, the bundler throws an error.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install globally: npm install -g pallet-bundler","cause":"Package not installed globally.","error":"Error: Cannot find module 'pallet-bundler'"},{"fix":"Create index.html or specify correct entry with -e.","cause":"Entry point missing or wrong path.","error":"Error: ENOENT: no such file or directory, open 'index.html'"},{"fix":"Ensure pallet.config.js exports a valid object.","cause":"Config file has invalid syntax.","error":"TypeError: Cannot read property 'split' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}