Use hook to disable a plugin


Hi guys

I would like to have a hook that disable a plugin.

Let me give you some context.

My app is using angular + redux.
To use the redux devtool I implemented remoteDev to communicate with a server using websocket.
But because we are in a nativescript environment, I have to use the nativescript-webpack plugin to make it work.
This is working fine and I’m happy with it.

But I don’t want to enable this into production and i don’t want to inject nativescript-webpack into my production build.

How could I do that, without having to install/uninstall all the time ? what are my options ?