Hello! Thank you for this library, it helped me a lot.
I faced some troubles using this package in Electron with enabled HMR option.
Every time i change my code, HMR instead of performing hotswap for changes just reloads whole page with this messages in console:
[HMR] Cannot apply update. Need to do a full reload!
[HMR] TypeError: window.amdRequire.config is not a function
I made a little investigation of the problem and found that this happens when I'm using MonacoEditorLoaderService in my main Angular module (to add json-schema) .
I analyzed MonacoEditorLoaderService class and I suppose that it is unnecessary to modify (window).amdRequire and (window).require when this service is being created for a second time because global state in "window" global variable is already set.
So I made this simple fix.
Hello! Thank you for this library, it helped me a lot.
I faced some troubles using this package in Electron with enabled HMR option. Every time i change my code, HMR instead of performing hotswap for changes just reloads whole page with this messages in console:
I made a little investigation of the problem and found that this happens when I'm using MonacoEditorLoaderService in my main Angular module (to add json-schema) .
I analyzed MonacoEditorLoaderService class and I suppose that it is unnecessary to modify (window).amdRequire and (window).require when this service is being created for a second time because global state in "window" global variable is already set.
So I made this simple fix.