Registry / devops / esbuild-plugin-exclude-vendor-from-source-map

esbuild-plugin-exclude-vendor-from-source-map

JSON →
library0.0.3jsnpmunverified

An esbuild plugin that excludes node_modules from source maps to reduce source map size. Current stable version is 0.0.3. This plugin modifies the generated source map by removing entries from vendor (node_modules) paths, which can significantly reduce file size for bundled applications. Key differentiator: it's a lightweight esbuild-specific solution for source map trimming, similar in spirit to Webpack's hidden-source-map or exclude options.

npm install esbuild-plugin-exclude-vendor-from-source-map
INSTALL
IMPORT
SIG · ESBUILD-PLUGIN-EXC
E
esbuild-plugin-exclude-vendor-from-source-map
devopsjavascriptv0.0.3
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.

excludeVendorFromSourceMap
✓ import { excludeVendorFromSourceMap } from 'esbuild-plugin-exclude-vendor-from-source-map'
✗ import excludeVendorFromSourceMap from 'esbuild-plugin-exclude-vendor-from-source-map'
This package only exports a named function, not a default export.

Demonstrates basic usage of the plugin with esbuild to exclude node_modules from source maps.

import esbuild from 'esbuild'; import { excludeVendorFromSourceMap } from 'esbuild-plugin-exclude-vendor-from-source-map'; await esbuild.build({ entryPoints: ['./src/index.js'], outfile: './dist/index.js', bundle: true, minify: true, sourcemap: true, plugins: [ excludeVendorFromSourceMap(), ], });
Debug
Known issues
gotchaThe plugin only affects source maps, not the bundle output. Source map paths are rewritten but not removed.
fix
Verify your source map by inspecting the output file. If vendor entries still appear, ensure the plugin is in the plugins array and that esbuild generates source maps (sourcemap: true).
affects: >=0.0.0
gotchaPlugin version is 0.0.3; API may change. No TypeScript declarations included.
fix
Consider pinning the version and using @ts-ignore or writing your own declaration file if using TypeScript.
affects: >=0.0.0
gotchaOnly works with esbuild's JavaScript API, not the CLI directly.
fix
Use the JavaScript API as shown in the quickstart.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'esbuild-plugin-exclude-vendor-from-source-map'
Package not installed or not in node_modules.
fix
Run 'npm i --save-dev esbuild-plugin-exclude-vendor-from-source-map'
The requested module 'esbuild-plugin-exclude-vendor-from-source-map' does not provide an export named 'default'
Default import used incorrectly; plugin only has named export.
fix
Use named import: import { excludeVendorFromSourceMap } from 'esbuild-plugin-exclude-vendor-from-source-map'
Upgrade
Version history
0.0.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
esbuild-plugin-exclude-vendor-from-source-map — npm install esbuild-plugin-exclude-vendor-from-source-map · libregistry