{"id":18643,"library":"packly","title":"Packly","description":"Packly is an HTML bundler for JavaScript applications. The current stable version is v0.0.4, released on an unscheduled cadence. It bundles HTML files and their dependencies into a single output. Key differentiators: lightweight, no heavy configuration, and TypeScript support. As an early-stage project, it may have limited features compared to mature bundlers like webpack or Parcel. Suitable for simple projects needing quick bundling without complex setups.","status":"active","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/dabbott/packly","tags":["javascript","typescript"],"install":[{"cmd":"npm install packly","lang":"bash","label":"npm"},{"cmd":"yarn add packly","lang":"bash","label":"yarn"},{"cmd":"pnpm add packly","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package; CommonJS require is not supported.","wrong":"const bundle = require('packly')","symbol":"bundle","correct":"import { bundle } from 'packly'"},{"note":"Type import is required for TypeScript interfaces; named import will cause runtime errors.","wrong":"import { PacklyOptions } from 'packly'","symbol":"PacklyOptions","correct":"import type { PacklyOptions } from 'packly'"},{"note":"Default export is a function for quick bundling; named 'default' import works but unnecessary.","wrong":"import { default as packly } from 'packly'","symbol":"default","correct":"import packly from 'packly'"}],"quickstart":{"code":"import { bundle } from 'packly';\n\nasync function build() {\n  const result = await bundle('src/index.html', {\n    outdir: 'dist',\n    minify: true,\n  });\n  console.log('Bundled files:', result.files);\n}\n\nbuild();","lang":"typescript","description":"Demonstrates bundling an HTML file with Packly, specifying output directory and minification."},"warnings":[{"fix":"Pin dependency to exact version.","message":"API may change in future releases without major version bump.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use ES module syntax or set type: 'module' in package.json.","message":"Only ESM imports are supported; CommonJS require throws error.","severity":"gotcha","affected_versions":"0.0.4"},{"fix":"Check .d.ts files for missing exports.","message":"TypeScript types are included but may be incomplete.","severity":"gotcha","affected_versions":"0.0.4"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install packly' and ensure import path is correct.","cause":"Package not installed or module resolution misconfigured.","error":"Cannot find module 'packly'"},{"fix":"Use 'import { bundle } from 'packly' for named function.","cause":"Using default import incorrectly or wrong import statement.","error":"TypeError: packly is not a function"},{"fix":"Add 'type': 'module' to package.json or rename file to .mjs.","cause":"Running ESM code in a CommonJS context.","error":"SyntaxError: Cannot use import statement outside a module"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}