1

Is it possible to somehow access the DevServer instance from a Webpack plugin? I would like to send a custom event from the server to the client (e.g. after a specific file change).

I saw that this is totally possible with Vite.js, but wonder if there is also a way with Webpack.

medihack
  • 16,045
  • 21
  • 90
  • 134
  • I don't think so. If you find how to do it I'd like to know. The only workaround that comes to my mind is switching from `webpack-dev-server` to `webpack-dev-middleware` which would let you add your own express middleware. – zoran404 Aug 27 '22 at 16:12

0 Answers0