rollup / rollup-plugin-commonjs

This module has moved and is now available at @rollup/plugin-commonjs / https://github.com/rollup/plugins/blob/master/packages/commonjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible with rollup-timer since 4.0.0

timdp opened this issue · comments

When used in conjunction with my rollup-timer package, rollup-plugin-commonjs causes infinite loops. I've narrowed it down to a change that was introduced in rollup-plugin-commonjs v4.0.0, because v3 used to work.

I suspect this statement might have something to do with it. Rollup-timer works by monkeypatching the plugin API functions to insert timing code. Because it replaces all the functions, the comparison on that line will always return false.

I realize that rollup-timer is just a workaround until Rollup itself gains performance metrics (we've discussed that under some other issue) but in the interim, I'd like to get this working again. I already tried patching index.js to compare resolveId against the plugin object's resolveId property rather than the internal function resolveId, but unfortunately, the infinite looping persisted. Any recommendations? Thanks!

Hey folks (this is a canned reply, but we mean it!). Thanks to everyone who participated in this issue. We're getting ready to move this plugin to a new home at https://github.com/rollup/plugins, and we have to do some spring cleaning of the issues to make that happen. We're going to close this one, but it doesn't mean that it's not still valid. We've got some time yet before the move while we resolve pending Pull Requests, so if this issue is still relevant, please @ me and I'll make sure it gets transferred to the new repo. 🍺