You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The better error message there when using watch with servedir flags is that servedir flag is only necessary. I'd also like to point out that I don't think the docs actually mention anywhere near the intro sections that you're suppose to use esbuild with node if using config file which servedir I think requires, therefore you have one of the more common use cases by in large undocumented in getting started.
The text was updated successfully, but these errors were encountered:
janat08
changed the title
cant use watch with servedir error clarification
cant use watch with servedir error clarification, and node config.js poorly placed in documentation
Oct 1, 2021
The better error message there when using watch with servedir flags is that servedir flag is only necessary
That's not true. The --watch and --servedir flags do different things; watching actively rebuilds when files change while serving only rebuilds when new requests come in. Some people explicitly want to do both (e.g. #805) and are passing --watch expecting it to change the behavior of --servedir. The reason is that these two flags are incompatible, not that --watch is redundant.
you're suppose to use esbuild with node if using config file which servedir I think requires
That's not true. I use esbuild --servedir=. all the time to get a local file server.
You think there’s any room for improvement in docs and error messages? The part with servedir having any rebundling behavior I teased out with some difficulty as I accidentally edited wrong file during testing. As far as googling goes having to use node for the config to be read (I don’t remember what makes it necessary) isn’t straightforward. Perhaps the js examples of commands should include a comment about node or at very least sections that deal with commands that must run through the config because the target audience then includes the clueless.
The better error message there when using watch with servedir flags is that servedir flag is only necessary. I'd also like to point out that I don't think the docs actually mention anywhere near the intro sections that you're suppose to use esbuild with node if using config file which servedir I think requires, therefore you have one of the more common use cases by in large undocumented in getting started.
The text was updated successfully, but these errors were encountered: