{"library":"rollup-plugin-import-trace","title":"rollup-plugin-import-trace","description":"Rollup/Vite plugin that attaches a detailed import trace chain to build errors, helping developers quickly identify which import path led to a problematic file. Version 1.0.1 is the current stable release. It works with Rollup 3/4 and Vite 5/6/7. Unlike Rollup's built-in `watchFiles` (which lists all watched files), this plugin records only the specific chain of imports causing the error. Ships TypeScript types and supports both ESM and CommonJS environments. Minimal configuration required: just add `importTrace()` first in the plugins array.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-import-trace"],"cli":null},"imports":["import { importTrace } from 'rollup-plugin-import-trace'","import importTrace from 'rollup-plugin-import-trace'","import { patchErrorWithTrace } from 'rollup-plugin-import-trace'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { importTrace } from 'rollup-plugin-import-trace';\nimport { rollup } from 'rollup';\n\nconst bundle = await rollup({\n  input: 'src/index.js',\n  plugins: [importTrace()]\n});\n\ntry {\n  await bundle.generate({ format: 'es' });\n} catch (error) {\n  console.log(error.importTrace); // outputs import chain or undefined\n}","lang":"typescript","description":"Demonstrates basic usage of importTrace plugin with Rollup, catching an error and inspecting the importTrace property.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}