{"id":24926,"library":"asset-mapper-esbuild","title":"asset-mapper-esbuild","description":"A manifest generator for ESBuild designed to integrate with Symfony AssetMapper (Mercure). Version 1.0.1, stable. It generates an asset manifest file during ESBuild builds, enabling Symfony's AssetMapper to resolve versioned asset URLs. This package bridges ESBuild's build output with Symfony's asset management system, providing a streamlined workflow for JavaScript/CSS assets in Symfony projects. It ships TypeScript definitions and requires esbuild >= 0.14.0 as a peer dependency. Relatively new with limited adoption.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/konnorrogers/asset_mapper#readme","tags":["javascript","asset_mapper","esbuild","typescript"],"install":[{"cmd":"npm install asset-mapper-esbuild","lang":"bash","label":"npm"},{"cmd":"yarn add asset-mapper-esbuild","lang":"bash","label":"yarn"},{"cmd":"pnpm add asset-mapper-esbuild","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for build process.","package":"esbuild","optional":false}],"imports":[{"note":"ESM-only; does not support CommonJS require.","wrong":"const assetMapperEsbuildPlugin = require('asset-mapper-esbuild')","symbol":"assetMapperEsbuildPlugin","correct":"import { assetMapperEsbuildPlugin } from 'asset-mapper-esbuild'"},{"note":"Type import; used for TypeScript type checking only.","wrong":"import { AssetMapperEsbuildPluginOptions } from 'asset-mapper-esbuild'","symbol":"AssetMapperEsbuildPluginOptions","correct":"import type { AssetMapperEsbuildPluginOptions } from 'asset-mapper-esbuild'"},{"note":"Default export; using named import for default is incorrect.","wrong":"import { default } from 'asset-mapper-esbuild'","symbol":"default","correct":"import assetMapperEsbuildPlugin from 'asset-mapper-esbuild'"}],"quickstart":{"code":"import { assetMapperEsbuildPlugin } from 'asset-mapper-esbuild';\nimport * as esbuild from 'esbuild';\n\nawait esbuild.build({\n  entryPoints: ['src/app.js'],\n  bundle: true,\n  outdir: 'public/build',\n  plugins: [assetMapperEsbuildPlugin({\n    publicPath: '/build',\n    outputPath: 'public/build',\n    manifestFilename: 'manifest.json',\n  })],\n});","lang":"typescript","description":"Shows how to integrate asset-mapper-esbuild plugin with ESBuild to generate an asset manifest file."},"warnings":[{"fix":"Ensure the generated manifest file (default: manifest.json) is committed to your repository or generated in the CI/CD pipeline.","message":"Manifest file must not be excluded from version control if used in production to resolve asset paths.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Replace 'assetMap' with 'publicPath' and 'outputPath' options.","message":"The 'assetMap' option was removed in v1.0; use 'publicPath' and 'outputPath' instead.","severity":"deprecated","affected_versions":"<1.0"},{"fix":"Update esbuild to version 0.14.0 or higher.","message":"ESBuild version must be >=0.14.0; older versions are incompatible.","severity":"gotcha","affected_versions":">=0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install the package: npm install asset-mapper-esbuild","cause":"Package not installed or import path misspelled.","error":"Error: Cannot find module 'asset-mapper-esbuild'"},{"fix":"Use default import: import assetMapperEsbuildPlugin from 'asset-mapper-esbuild'","cause":"Incorrect import (e.g., using default import as named import).","error":"TypeError: assetMapperEsbuildPlugin is not a function"},{"fix":"Install esbuild >=0.14.0: npm install esbuild@^0.14.0","cause":"esbuild not installed or version incompatible.","error":"Error: Cannot find esbuild peer dependency"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}