Skip to content
PluginStats

rollup-plugin-import-trace weekly downloads statistics

By privatenumber (2 listings) · npm · Vite plugins

Rollup/Vite plugin to track import chains for better error debugging

View on npm Fresh · Dec 6, 2026

rollup-plugin-import-trace has 383,428 recorded weekly downloads on npm, an increase of 124% over the past 30 days, ranking #435 of 3,247 tracked listings.

Weekly downloads
383,428
Official API · Dec 5, 2026
7-day growth
+26.3%
+79.8K weekly downloads
30-day growth
+124%
+212.2K weekly downloads
90-day growth
+1391%
+357.7K weekly downloads
Rank
#435
▲ 13 in 7 days

About rollup-plugin-import-trace

rollup-plugin-import-trace

Rollup/Vite plugin that adds import traces to build errors.

When a build error is thrown, the plugin adds an importTrace property showing the chain of imports that led to the problematic file:

Error [RollupError]: node_modules/some-lib/dist/styles.css (1:0): Expression expected (Note that you need plugins to import files that are not JavaScript)
    at getRollupError (...) {
  code: 'PARSE_ERROR',
  id: '/project/node_modules/some-lib/dist/styles.css',
  loc: { column: 0, file: '/project/node_modules/some-lib/dist/styles.css', line: 1 },
  frame: '1: .class {\n   ^\n2:     color: red;\n3: }',

  // ⬇️ Added by this plugin
  importTrace: [
    '/project/src/index.js',
    '/project/src/components/Button.js',
    '/project/node_modules/some-lib/dist/index.js',
    '/project/node_modules/some-lib/dist/styles.css'
  ]
}

[!NOTE] Rollup errors have a watchFiles property that may look similar, but it's just files for watch mode to monitor. It includes all files imported from the entry point, not just the chain that led to the error.

Install

npm install rollup-plugin-import-trace

Usage

import { importTrace } from 'rollup-plugin-import-trace'

export default {
    plugins: [
        importTrace()
        // other plugins...
    ]
}

[!IMPORTANT] List importTrace() first in the plugins array. Its resolveId hook needs to run before other plugins to record import relationships for error recovery.

Works with Rollup and Vite (both dev and build modes).

Formatting Utility

In Vite dev mode, the error message is automatically formatted for the browser overlay:

[plugin:vite:import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.

Import trace:
    /project/index.js
    ↳ /project/a.js
    ↳ /project/b.js
    ↳ /project/broken.js

/project/broken.js:1:30
1  |  export const value = "unclosed
   |                                ^
    at TransformPluginContext._formatLog ...

For other cases (e.g. CLI tools), use patchErrorWithTrace(error) to format and append the trace to the error message:

import { importTrace, patchErrorWithTrace } from 'rollup-plugin-import-trace'

try {
    await rollup({
        input: 'src/index.js',
        plugins: [importTrace()]
    })
} catch (error) {
    patchErrorWithTrace(error)
    console.error(error.message)
}

Output:

node_modules/some-lib/dist/styles.css (1:0): Expression expected (Note that you need plugins to import files that are not JavaScript)

Import trace:
    /project/src/index.js
    ↳ /project/src/components/Button.js
    ↳ /project/node_modules/some-lib/dist/index.js
    ↳ /project/node_modules/some-lib/dist/styles.css

[!TIP] patchErrorWithTrace accepts unknown—safely does nothing if the error doesn't have an importTrace array.

Description from the npm listing.

  • rollup
  • rollup-plugin
  • vite
  • vite-plugin
  • import
  • trace
  • debug
  • error

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

rollup-plugin-import-trace weekly downloads on npm, last 90 days: 383,428 weekly downloads as of Dec 5, 2026, +1391% over 90 days.rollup-plugin-import-traceWeekly downloads on npm · Last 90 days383,428downloads / week+1391% over 90 days0100K200K300K400KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
rollup-plugin-import-trace weekly downloads on npm, last 90 days: 383,428 weekly downloads as of Dec 5, 2026, +1391% over 90 days.

7/30/90-day growth

rollup-plugin-import-trace weekly downloads growth on npm: +26.3% over 7 days, +124% over 30 days, +1391% over 90 days.rollup-plugin-import-traceWeekly downloads growth on npm383,428downloads / week now7-day growth+79,772 weekly downloads+26.3%30-day growth+212,229 weekly downloads+124%90-day growth+357,706 weekly downloads+1391%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
rollup-plugin-import-trace weekly downloads growth on npm: +26.3% over 7 days, +124% over 30 days, +1391% over 90 days.

Ranking history

rollup-plugin-import-trace npm ranking history: currently #435 (by weekly downloads).rollup-plugin-import-tracenpm ranking · by weekly downloads · Last 90 days#435current rank#400#450#500#550#600#650Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
rollup-plugin-import-trace npm ranking history: currently #435 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 22, #15 (overall #435)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 4, #3 (overall #63)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for rollup-plugin-import-trace
Date (UTC)Weekly downloadsChange vs. previous
383,428+4.6K
378,823+12.2K
366,635+27.6K
339,017+15K
324,010+8.2K
315,783+11.9K
303,847+191
303,656-2K
305,703+9.9K
295,771-3.1K
298,855-15.3K
314,126+7.1K
307,054-5.8K
312,859—

Similar npm Vite plugins plugins

All 20 rollup-plugin-import-trace alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/rollup-plugin-import-trace. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.