Skip to content

Negative Lookahead is not a valid Go Regular Expression #4

@shellscape

Description

@shellscape

Hey there. Thanks for this plugin.

Using a valid regex: /(\.js(?!on)(x)?)|(\.flow(\..+)?)$/

Esbuild throws the following error:

Build Error: Error: [flow] "onLoad" filter is not a valid Go regular expression: "(\\.js(?<!\\.json)(x)?)|(\\.flow(\\..+)?)$"

While this may not be a bug in the plugin, it's definitely not something I thought I'd run into. I'll report this to esbuild as well, but at the least I think it would be good for the docs to be updated.

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