Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Fix" cross origin monaco web workers
This is a workaround to make cross origin monaco web workers function in spite of the monaco webpack plugin hijacking the MonacoEnvironment global. see microsoft/monaco-editor-webpack-plugin#42 This workaround wouldn't be so bad, if it didn't _also_ rely on *another* bug to actually work. The webpack plugin incorrectly uses window.__webpack_public_path__ when it should use __webpack_public_path__ see microsoft/monaco-editor-webpack-plugin#63 We can leave __webpack_public_path__ with the correct value, which lets runtime chunk loading continue to function correctly. We can then set window.__webpack_public_path__ to the below handler, which lets us fabricate a worker on the fly. This is bad and I feel bad.
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters