An esbuild plugin for Hanami asset management, version 2.3.2 (stable, released March 2025). It integrates esbuild into the Hanami Ruby web framework pipeline, providing JavaScript/CSS bundling, fingerprinting, and asset helpers. Unlike standalone esbuild, this plugin respects Hanami's asset directory conventions and integrates with Hanami's view helpers for asset tags. Release cadence is irregular, tied to Hanami framework updates. It is ESM-only and ships TypeScript definitions.
npm install hanami-assetsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Bundles a JavaScript entry point with esbuild and Hanami assets plugin, generating fingerprinted assets.
Ensure hanamiAssets is the first plugin in the plugins array.
Upgrade glob dependency to ^13.0.6.
Switch to ES module imports (import syntax) or use dynamic import().
Ensure manifestPath is writable and not used by another process.
Replace require with import or use dynamic import().
Use `import hanamiAssets from 'hanami-assets'` (ESM).
Create the output directory before running the build or set manifestPath correctly.
Install esbuild: npm install esbuild --save-dev