fix(CodeModal): Switch over to lazy loading Monaco#763
Merged
rebeccaalpert merged 1 commit intopatternfly:mainfrom Nov 18, 2025
Merged
fix(CodeModal): Switch over to lazy loading Monaco#763rebeccaalpert merged 1 commit intopatternfly:mainfrom
rebeccaalpert merged 1 commit intopatternfly:mainfrom
Conversation
|
Preview: https://chatbot-pr-chatbot-763.surge.sh A11y report: https://chatbot-pr-chatbot-763-a11y.surge.sh |
b4f1316 to
371c5c3
Compare
Contributor
371c5c3 to
6435445
Compare
Member
Author
|
Just renaming commit to be something compatible with automatic release - no code changes. |
jschuler
approved these changes
Nov 17, 2025
Contributor
jschuler
left a comment
There was a problem hiding this comment.
Looks great apart from a minor comment!
packages/module/package.json
Outdated
| "react": "^18 || ^19", | ||
| "react-dom": "^18 || ^19" | ||
| "react-dom": "^18 || ^19", | ||
| "monaco-editor": "^0.54.0" |
Contributor
There was a problem hiding this comment.
should probably also list @monaco-editor/react here?
Member
Author
There was a problem hiding this comment.
All set; thank you!
Red Hat Developer Hub needs a smaller bundle size. They and we are unable to use Webpack plugins directly, so this is a solution that works independently of the Monaco Webpack plugin. Does add a loading state if the third-party dependency needs a moment. Consumers will need to add their own peer dependencies for monaco-editor and @monaco-editor/react.
b7c859d to
4fd320b
Compare
thatblindgeye
approved these changes
Nov 18, 2025
|
🎉 This PR is included in version 6.5.0-prerelease.19 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Red Hat Developer Hub needs a smaller bundle size. Checking with Karthik to see if lazy loading/peer dep changes work - Backstage doesn't have webpack plugin configuration and neither do we. Backstage uses Webpack under the hood in a non-accessible way, so it may pick this up and reduce the bundle size.
Am interested to know if they can also try using React.lazy/Suspense when loading the Code Modal - it may be that Backstage is able to optimize if that is done, but I am unsure.
Does add a loading state if the third-party dependency needs a moment.
Will also see if Joachim has ideas.