{"id":25337,"library":"esbuild-plugin-exclude-vendor-from-source-map","title":"esbuild-plugin-exclude-vendor-from-source-map","description":"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.","status":"active","version":"0.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/andidev/esbuild-plugin-exclude-vendor-from-source-map","tags":["javascript","esbuild","plugin","sourcemap"],"install":[{"cmd":"npm install esbuild-plugin-exclude-vendor-from-source-map","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-exclude-vendor-from-source-map","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-exclude-vendor-from-source-map","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package only exports a named function, not a default export.","wrong":"import excludeVendorFromSourceMap from 'esbuild-plugin-exclude-vendor-from-source-map'","symbol":"excludeVendorFromSourceMap","correct":"import { excludeVendorFromSourceMap } from 'esbuild-plugin-exclude-vendor-from-source-map'"}],"quickstart":{"code":"import esbuild from 'esbuild';\nimport { excludeVendorFromSourceMap } from 'esbuild-plugin-exclude-vendor-from-source-map';\n\nawait esbuild.build({\n    entryPoints: ['./src/index.js'],\n    outfile: './dist/index.js',\n    bundle: true,\n    minify: true,\n    sourcemap: true,\n    plugins: [\n        excludeVendorFromSourceMap(),\n    ],\n});","lang":"javascript","description":"Demonstrates basic usage of the plugin with esbuild to exclude node_modules from source maps."},"warnings":[{"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).","message":"The plugin only affects source maps, not the bundle output. Source map paths are rewritten but not removed.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider pinning the version and using @ts-ignore or writing your own declaration file if using TypeScript.","message":"Plugin version is 0.0.3; API may change. No TypeScript declarations included.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use the JavaScript API as shown in the quickstart.","message":"Only works with esbuild's JavaScript API, not the CLI directly.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm i --save-dev esbuild-plugin-exclude-vendor-from-source-map'","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'esbuild-plugin-exclude-vendor-from-source-map'"},{"fix":"Use named import: import { excludeVendorFromSourceMap } from 'esbuild-plugin-exclude-vendor-from-source-map'","cause":"Default import used incorrectly; plugin only has named export.","error":"The requested module 'esbuild-plugin-exclude-vendor-from-source-map' does not provide an export named 'default'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}