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

CORS error when using import(...) #3293

Open
lborgman opened this issue Jan 25, 2025 · 2 comments
Open

CORS error when using import(...) #3293

lborgman opened this issue Jan 25, 2025 · 2 comments
Labels

Comments

@lborgman
Copy link

Describe the bug

const mod = await import("https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js");

This gives

Uncaught TypeError: Failed to fetch dynamically imported module: https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js

To Reproduce

See above.

Expected behavior

I expected the import to succeed and mod to be an es6 module.

Desktop (please complete the following information):

  • Windows 11
  • Goggle Chrome
  • Both updated to latest version today

Additional context

The link to the file I am trying to import seems correct. If I click it in the console log it opens as expected.

@lborgman lborgman added the Bug label Jan 25, 2025
@sukus21
Copy link

sukus21 commented Feb 6, 2025

https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js does not look like an ESM module, it looks more like a commonJS or AMD module

@lborgman
Copy link
Author

lborgman commented Feb 7, 2025

@sukus21 Thanks, yes I know. But why do I get a CORS error?

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

No branches or pull requests

2 participants