Registry / http-networking / asset-mapper-esbuild

asset-mapper-esbuild

JSON →
library1.0.1jsnpmunverified

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.

npm install asset-mapper-esbuild
INSTALL
IMPORT
SIG · ASSET-MAPPER-ESBUI
A
asset-mapper-esbuild
http-networkingjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

assetMapperEsbuildPlugin
import { assetMapperEsbuildPlugin } from 'asset-mapper-esbuild'
const assetMapperEsbuildPlugin = require('asset-mapper-esbuild')
ESM-only; does not support CommonJS require.
AssetMapperEsbuildPluginOptions
import type { AssetMapperEsbuildPluginOptions } from 'asset-mapper-esbuild'
import { AssetMapperEsbuildPluginOptions } from 'asset-mapper-esbuild'
Type import; used for TypeScript type checking only.
default
import assetMapperEsbuildPlugin from 'asset-mapper-esbuild'
import { default } from 'asset-mapper-esbuild'
Default export; using named import for default is incorrect.

Shows how to integrate asset-mapper-esbuild plugin with ESBuild to generate an asset manifest file.

import { assetMapperEsbuildPlugin } from 'asset-mapper-esbuild'; import * as esbuild from 'esbuild'; await esbuild.build({ entryPoints: ['src/app.js'], bundle: true, outdir: 'public/build', plugins: [assetMapperEsbuildPlugin({ publicPath: '/build', outputPath: 'public/build', manifestFilename: 'manifest.json', })], });
Debug
Known issues
gotchaManifest file must not be excluded from version control if used in production to resolve asset paths.
fix
Ensure the generated manifest file (default: manifest.json) is committed to your repository or generated in the CI/CD pipeline.
affects: >=1.0
deprecatedThe 'assetMap' option was removed in v1.0; use 'publicPath' and 'outputPath' instead.
fix
Replace 'assetMap' with 'publicPath' and 'outputPath' options.
affects: <1.0
gotchaESBuild version must be >=0.14.0; older versions are incompatible.
fix
Update esbuild to version 0.14.0 or higher.
affects: >=0
Errors
Common errors & fixes
Error: Cannot find module 'asset-mapper-esbuild'
Package not installed or import path misspelled.
fix
Install the package: npm install asset-mapper-esbuild
TypeError: assetMapperEsbuildPlugin is not a function
Incorrect import (e.g., using default import as named import).
fix
Use default import: import assetMapperEsbuildPlugin from 'asset-mapper-esbuild'
Error: Cannot find esbuild peer dependency
esbuild not installed or version incompatible.
fix
Install esbuild >=0.14.0: npm install esbuild@^0.14.0
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
esbuildrequiredPeer dependency for build process.
Agent activity
24 hits · last 30 days
node
20
OpenAI (training)
1
Resources
asset-mapper-esbuild — npm install asset-mapper-esbuild · libregistry