Skip to content

Bug - [CodeEditor] - loads files from CDN instead of node_modules #10664

@christianvogt

Description

@christianvogt

Describe the problem

CodeEditor utilizes the monaco editor under the covers. When the component loads, several files are downloaded from external CDN. Expectation is for all dependencies to come pre-packaged with patternfly.

A link to the documentation for this:
https://github.com/suren-atoyan/monaco-react?tab=readme-ov-file#use-monaco-editor-as-an-npm-package

How do you reproduce the problem?

Visit the patternfly CodeEditor component page: https://www.patternfly.org/components/code-editor

Observe in the network requests several files related to monaco editor loading from external CDN:
image

Expected behavior

Files should be packaged node_modules with no reliance on external CDN.

Is this issue blocking you?
List the workaround if there is one.

import { loader } from '@monaco-editor/react';
loader.config({ monaco });

What is your product and what release date are you targeting?
RHOAI 2.12

Any other information?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions