Closed jseparovic closed 2 weeks ago
It seems like you have run into a thing that is explained in the docs:
https://esbuild.github.io/api/#glob-style-entry-points
If you are using esbuild via the CLI, keep in mind that if you do not quote arguments that contain shell metacharacters before you pass them to esbuild, your shell will likely expand them before esbuild sees them. So if you run
esbuild "*.js"
(with quotes) then esbuild will see an entry point of*.js
and the glob-style entry point rules described above will apply. But if you runesbuild *.js
(without quotes) then esbuild will see whatever your current shell decided to expand*.js
into (which may include seeing nothing at all if your shell expanded it into nothing). Using esbuild's built-in glob pattern support can be a convenient way to ensure cross-platform consistency by avoiding shell-specific behavior, but it requires you to quote your arguments correctly so that your shell doesn't interpret them.
Your shell probably does not support **
globs (or isn’t configured to), so it treats **
as two *
(which only match one level) in a row.
Yep that was the problem. Thank you. Cheers
On version 0.24.0 I noticed that glob matches aren't working for all subpaths when using /**/
I have to run this instead: