Skip to content

skipSelf: true does not skip the plugin if it has been called before with the same id and importer #5768

@sapphi-red

Description

@sapphi-red

Rollup Version

4.28.1

Operating System (or Browser)

Stackblitz

Node Version (if applicable)

No response

Link To Reproduction

https://stackblitz.com/edit/rollup-repro-6yyh93an?file=rollup.config.js

Expected Behaviour

The input to resolve to success id and the build finishes.

In this reproduction, r1 plugin and r2 plugin calls each other: r1(virtual, foo) -> r2(virtual, bar) -> r1(virtual, foo) -> r2(virtual, bar) -> ...

The document says:

When other plugins themselves also call this.resolve in their resolveId hooks with the exact same source and importer while handling the original this.resolve call, then the resolveId hook of the original plugin will be skipped for those calls as well.

I'm not sure if it applies to this case, but I think skipping the recursive calls makes sense in this case because the same rationale makes sense.

The rationale here is that the plugin already stated that it "does not know" how to resolve this particular combination of source and importer at this point in time.

Actual Behaviour

The input is not resolved forever.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions