baldore / open-browser-webpack-plugin

Opens a new browser tab when Webpack loads.
119 stars 27 forks source link

Execute callbacks once but don't remove them #17

Closed plemarquand closed 7 years ago

plemarquand commented 7 years ago

Some webpack plugins (at least webpack-dev-middleware) rely on the plugin callback array not being modified.

Instead of unhooking the listener when the browser has been opened, simply perform a no-op after the first function call. This avoids having to mutate the callback array while still maintaining the old behaviour.

Fixes #9 Fixes #11