fix(CodeEditor): Don't use CDN for loading monaco#743
fix(CodeEditor): Don't use CDN for loading monaco#743rebeccaalpert merged 1 commit intopatternfly:mainfrom
Conversation
|
Preview: https://chatbot-pr-chatbot-743.surge.sh A11y report: https://chatbot-pr-chatbot-743-a11y.surge.sh |
644f4ee to
356db05
Compare
The @patternfly/react-code-editor library uses a CDN to load some Monaco stuff by default. This doesn't work for all consumers. Adjusting so we can do without the CDN.
356db05 to
14f5342
Compare
kmcfaul
left a comment
There was a problem hiding this comment.
I think this should be how it's supposed to be set up, and I'm not seeing the warning on the surge (though it could be getting obfuscated by two minified react errors that are in the console). I'm not 100% though, it may just needs some testing to make sure the code editor is still functioning and not freezing.
|
With this PR changes, I can now see the monaco-editor is loading from
|
|
Awesome! Thanks @karthikjeeyar. |
|
🎉 This PR is included in version 6.5.0-prerelease.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |

The @patternfly/react-code-editor library uses a CDN to load some Monaco stuff by default. This doesn't work for all consumers. Adjusting so we can do without the CDN.
Found this in the docs for @patternfly/react-code-editor:
Doing this seems to get us off the CDN network calls, but I'm seeing some grumpy console warnings from Monaco:
The editor does seem to work though? I don't see a webpack config we can plug into either.
You can see an example of Monaco usage here: https://chatbot-pr-chatbot-743.surge.sh/patternfly-ai/chatbot/messages/#editable-attachments