-
Notifications
You must be signed in to change notification settings - Fork 126
Process of virtual modules #315
Comments
Can you confirm that this has happened with the change from 9.1.0 to 9.1.1? In any case, I will re-release 9.1.0 as 9.1.2 now until we get to the bottom of this. |
Done |
This is still occurring with rollup-plugin-commonjs 9.1.3. See this issue for full description of my config: alex-kinokon/rollup-plugin-ignore#2 |
I came here by searching for I'm not sure what is causing this in my code, but if I remove the commonjs plugin, the error is different (because it can't process requires otherwise), so it leads me to believe this plugin is the root cause. I am using the following plugins
Stack trace
|
@lukastaegert I don’t think the commit has anything to do with this issue. |
@jeffijoe I agree this has probably nothing to do with the current issue. From the stack trace this very much looks like an issue with rollup itself and should be raised there. The reason removing this plugin changes the error could be because the error originates from a CJS module. Before raising an issue for rollup itself, make sure you are using the latest rollup version 0.59.4 as well as the latest version of the plugins. It would also be EXTREMELY helpful and significantly shorten the time until it is fixed if you could add a repo exposing the error. |
@lukastaegert I've reproduced the bug for you: https://github.com/aleclarson/rollup-bugs/tree/commonjs-issue-315 Hope that helps :) |
@aleclarson Thanks! I already opened an issue on rollup for this an linked your repository: rollup/rollup#2317 (comment) |
@lukastaegert The bug demonstrated by my repro is fixed by PR #327 to this plugin. :) |
Ah, I might have mixed up issues here. Thanks a lot! As I am just heading off to my vacation it might be a week until I can review it properly, though. |
I've improved the error output for this case in rollup/rollup#2334. The fix at #327 seems roughly the right direction to me. |
* fix: ignore virtual modules from other plugins Closes #315 * Add test that virtual modules are ignored
|
upgrades were causing rollup/rollup-plugin-commonjs#315 so removing rollup plugin ignore in favor of commonjs' ignore option works instead ONLY in this case because pikaday handles the check for momentjs with a try/catch
It seems that this plugin will attempt to process virtual modules generated by other plugins, contrary to the convention. rollup-plugin-ignore uses
\0empty-module
as a virtual module for an empty module file, which in turns is transformed by rollup-plugin-commonjs as\0commonjs-proxy:\0empty_module
.The text was updated successfully, but these errors were encountered: