Skip to content

onResolve is not fired on entrypoints when namespace equals 'file' #791

Closed
@igoradamenko

Description

@igoradamenko

Hey there!

I was writing a plugin and realized that onResolve is not fired on entrypoints when namespace equals 'file'.

build.onResolve({ filter: /someregexp/, namespace: 'file' }, args => {});

↑ callback here won't be fired on entrypoint JS file.

build.onResolve({ filter: /someregexp/ }, args => {});

↑ callback here will be fired on entrypoint JS file. And args.namespace will be an empty string.

It is probably related to #546, but I'm not sure. Is it a normal thing, or a bug? I want to make sure that my plugin do not process anything not related to it, and have decided to use namespace: 'file'. But I also need to process entrypoints. So right now I have to omit namespace setting in onResolve filtering.

(I can create a small example project to illustrate the behavior.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions