Skip to content

Plugin filter RegEx doesn't support case-insensitive flag #4121

@graysonlang

Description

@graysonlang

The filter argument for the onResolve and onLoad plugin API doesn't appear to respect the RegExp case-insensitivity flag.

For example, the following will only match files ending in .cpp or .c but not .C or .CPP even though the i flag is specified at the end of the RegExp literal.

build.onResolve({ filter: /\.c(pp)?$/i }, (args) => { ... }

I also attempted to use the new RegExp('\.c(pp)?$', 'i') form but it didn't work either. 😔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions