Closed theoephraim closed 4 years ago
after lots of struggling, I read more of this source code and realized it was because I had
self.MonacoEnvironment = {}
(with the commented out getWorkerUrl inside it.
Perhaps a warning could be helpful, or loading in the existing MonacoEnvironment
if it exists and overwriting it?
From the examples, it seems setting things up with defaults, everything should just work. If I do that, I get the following error:
Could not create web worker(s). Falling back to loading web worker code in main thread
While annoying, this is fixable by defining the
getWorkerUrl
function.Easy enough, but if I want to include a content hash in the worker url (for example setting
filename: '[name].worker.[contenthash:8].js'
then I have no easyway to get that hash to use in the above function.Is this expected behaviour? Should this just magically work without defining getWorkerUrl?