esbuild-plugin-flow icon indicating copy to clipboard operation
esbuild-plugin-flow copied to clipboard

Negative Lookahead is not a valid Go Regular Expression

Open shellscape opened this issue 2 years ago • 0 comments

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.

shellscape avatar Dec 29 '22 19:12 shellscape