suren-atoyan / monaco-react

Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins
https://monaco-react.surenatoyan.com/
MIT License
3.82k stars 269 forks source link

Why do I open it quickly after using vpn and loading it all the time without using vpn? #633

Closed zhangwei900808 closed 4 months ago

zhangwei900808 commented 5 months ago

Describe the bug Why do I open it quickly after using vpn and loading it all the time without using vpn?

zhangwei900808 commented 4 months ago

I found monaco-react editor will request https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs/loader.js. But Its not work in China! so how can I replace it

zhangwei900808 commented 4 months ago

I resolved and document had written about how to resovle this problem.

import Editor, { DiffEditor, useMonaco, loader } from '@monaco-editor/react';

loader.config({
    paths: {
        vs: 'monaco cdn link'
    },
    'vs/nls': {
        availableLanguages: {
            '*': 'en',
        },
    }
})