Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace monaco CDN loader with npm package #2346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jansule
Copy link
Contributor

@jansule jansule commented Aug 18, 2023

Description

This makes use of the monaco loader and configs provided via npm. By default, the editor requests those via http requests to a CDN. Now, everything is included in the build, so no more requests will be sent.

See also https://github.com/suren-atoyan/monaco-react#use-monaco-editor-as-an-npm-package.

Fixes #2345

Do you introduce a breaking change?

  • Yes
  • No
  • I am unsure (no worries, we'll find out)

@@ -33,7 +33,32 @@ import React, {
useState
} from 'react';

import Editor, { useMonaco } from '@monaco-editor/react';
import * as monaco from 'monaco-editor';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import * as monaco from 'monaco-editor';
import monaco from 'monaco-editor';

should work too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Geostyler sends request to online cdn
2 participants