Hi all, is there some robust way to detect from Ko...
# javascript
p
Hi all, is there some robust way to detect from Kotlin/JS logic if Webpack dev server is running? I want to choose between
RealBackendClient
and
MockedBackendClient
without the necessity to change code when using Webpack dev server. For now I found out that
webpackHotUpdatefrontend_react
function (my module is called
frontend-react
) is defined in
window
, but it seems hacky. Is there any more elegant way?
example when this hacky way may fail - renaming the frontend module