Skip to content

(createFilter): should it recognize *.ext as matching files at root path? #1538

Description

@gyhyfj

Currently,
if the include field is ['123.ts'], file named 123.ts at root path of project will be included.
but if the include field is ['*.ts'], file named 123.ts at root path of project will not be included.

Should I modify code in packages/pluginutils/src/createFilter.ts like this ?

  function getMatcherString(id: string, resolutionBase: string | false | null | undefined) {
-   if (resolutionBase === false || isAbsolute(id) || id.startsWith('*')) {
+   if (resolutionBase === false || isAbsolute(id) || id.startsWith('**')) {

Sorry I can't make a pr cause test script can't run on my pc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions