function initWHMEventSource(messageHandler) {
  const client = window[singletonKey];

  client.useCustomOverlay({
    showProblems: function showProblems(type, data) {
      const error = {
        data: data,
        type: type,
      };

      messageHandler(error);
    },
    clear: function clear() {
      messageHandler({ type: 'ok' });
    },
  });
}
Initializes a socket server for HMR for webpack-hot-middleware.
@param {function(*): void} messageHandler A handler to consume Webpack compilation messages.
@returns {void}