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

Increases the robustness of CDN resource loading #670

Open
izhangxb opened this issue Feb 11, 2025 · 1 comment
Open

Increases the robustness of CDN resource loading #670

izhangxb opened this issue Feb 11, 2025 · 1 comment

Comments

@izhangxb
Copy link

Is your feature request related to a problem? Please describe.
When I'm using monaco-react, I occasionally run into a problem where the CDN resource fails to load, and once it fails, the Editor is unavailable to the user.

Describe the solution you'd like
I want a callback that failed to load and provide a refresh-like action to try to reload the resource.

Or a built-in link with multiple CDNs that can automatically switch alternate links when one is slow to load or fails.

Thanks~

@suren-atoyan
Copy link
Owner

The default CDN, which is jsdelivr had some issues in China before (if that's the case here).

You can use config method to change the CDN, like here

Also, doesn't loader.init().catchcatch the failed load?

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

No branches or pull requests

2 participants