Skip to content

incorrect regex pattern causes transforms to be skipped in Windows #924

@dy-dx

Description

@dy-dx

I've been debugging an issue where transforms wouldn't get applied in Windows, and I've tracked it down to this regexp:

var row = typeof file === 'object'
    ? xtend(file, opts)
    : (/^[\/.]/.test(file)
        ? xtend(opts, { file: file })
        : xtend(opts, { id: file })
    );

For example, /Users/me/index.js passes this test but C:\Users\me\index.js fails.

In my case, row.file ended up being undefined which caused transforms to be skipped silently.

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