esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

A way to detect watch mode in 0.17.x

Open YurySolovyov opened this issue 2 years ago • 4 comments

Before version 0.17.0 it was possible to detect watch mode by looking at build.initialOptions.watch, but with move to context API, what would be preferred way to detect watch mode from within a plugin to alter its logic?

YurySolovyov avatar Jan 14 '23 14:01 YurySolovyov

looking for the solution as well... @evanw do we have a workaround?

indooorsman avatar Jan 19 '23 07:01 indooorsman

I think I'm running into the same issue with watch as well.

woodcox avatar Jan 25 '23 21:01 woodcox

I’ve come across esbuild-dev. Hopefully this example will be useful for your plugins.

woodcox avatar Jan 28 '23 04:01 woodcox

hey guys I just happen to see this issue and remember seeing a video that talks about this breaking change. The guy in the video doesn't seem happy about the change but he still managed to change his watch to the context watch, so you might find it useful https://www.youtube.com/watch?v=KBRQXPvJmw8

ghiscoding avatar Feb 13 '23 04:02 ghiscoding