I tried integrating this for my custom React renderer which uses a JS environment more similar to Node (e.g. uses global rather than window). After I aliased global as window, it got stumped by the lack of an addEventListener API:
file: node_modules/@pmmmwh/react-refresh-webpack-plugin/src/runtime/errorEventHandlers.js:85:10: JS ERROR TypeError: global.addEventListener is not a function. (In 'global.addEventListener(eventType, eventHandler)', 'global.addEventListener' is undefined)
What are the browser dependencies, and can anything be done to decouple it from the browser?
I tried integrating this for my custom React renderer which uses a JS environment more similar to Node (e.g. uses
globalrather thanwindow). After I aliasedglobalaswindow, it got stumped by the lack of anaddEventListenerAPI:What are the browser dependencies, and can anything be done to decouple it from the browser?