{"id":22318,"library":"rollup-timer","title":"rollup-timer","description":"Times Rollup plugins by monkey-patching plugin API functions. Version 0.3.4 is stable with no recent updates; it works with Rollup <1 and is incompatible with rollup-plugin-commonjs. Differentiator: simple drop-in timing for Rollup builds, with support for both promise and stream-based rollup invocations.","status":"maintenance","version":"0.3.4","language":"javascript","source_language":"en","source_url":"https://github.com/timdp/rollup-timer","tags":["javascript"],"install":[{"cmd":"npm install rollup-timer","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-timer","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-timer","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export is the time() function; CommonJS require returns the module object, not the function directly.","wrong":"const time = require('rollup-timer')","symbol":"time","correct":"import time from 'rollup-timer'"},{"note":"RollupTimer is a named export, not default.","wrong":"import RollupTimer from 'rollup-timer'","symbol":"RollupTimer","correct":"import { RollupTimer } from 'rollup-timer'"},{"note":"There is no named export 'time'; using named import incorrectly yields undefined.","wrong":"import { time } from 'rollup-timer'","symbol":"time (named import)","correct":"import * as timer from 'rollup-timer'; timer.default()"}],"quickstart":{"code":"const rollup = require('rollup');\nconst time = require('rollup-timer').default;\ntime(rollup);\nconst options = { input: 'src/index.js', plugins: [] };\nrollup.rollup(options).then(bundle => bundle.write({ file: 'dist/bundle.js' })).catch(err => console.error(err));","lang":"javascript","description":"Monkey-patches Rollup to time plugin execution and outputs timing information."},"warnings":[{"fix":"Avoid using rollup-timer with rollup-plugin-commonjs, or expect inaccurate timing data.","message":"rollup-timer is incompatible with rollup-plugin-commonjs; timings for that plugin will be incomplete.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider using Rollup's built-in timing support or other profiling tools.","message":"The package monkey-patches internal Rollup API and may break with future Rollup versions. Last updated for Rollup 0.x; not tested with Rollup 1+.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Ensure plugins provide a 'name' property; submit PRs to plugin authors if missing.","message":"Plugin 'name' property required for readable reports; if a plugin lacks name, the report falls back to numeric index.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'import time from 'rollup-timer''","cause":"Using named import 'time' instead of default import.","error":"TypeError: (0 , _rollupTimer2.default) is not a function"},{"fix":"Use 'const time = require('rollup-timer').default'","cause":"Incorrectly importing as named export or using CommonJS without .default.","error":"time is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}