-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
docs(Installation): import OrbitControls from Skypack CDN is not working #23427
Comments
This is a bug with skypack-cdn: skypackjs/skypack-cdn#263 |
Got it! |
Should we just change the links to use https://unpkg.com/ instead? |
Probably the best approach to avoid more confusion. |
Is the intention to wait for skypack-cdn to be fixed, or update the docs with a new recommended pattern? Perhaps this issue can be re-opened until the docs include working instructions for CDN usage. I haven't had success using Three from any CDN with the current documentation. I've seen a couple patterns for CDN usage floating around, including the one shown above as well as setting up a Additionally, if import maps are indeed a requirement for CDN usage, it would be helpful to make the polyfill instructions more explicit in the docs. |
I think it makes sense to add a note to the |
Describe the bug
Try using the
OrbitControls
from Skypack CDN according to the installation section but not working now.Seems after #23255 merged, it also needs to use
import maps
before importing modules in examples.And also I found the Skypack CDN will still try to export the default even though a js module has no default export.
After I tried, I solved these two problems with the following code:
I think the related docs can be updated to this, what do you think? But in my solution, I'm using two different CDNs. In case Skypack is currently unavailable, I wonder if we can switch all to unpkg (
https://unpkg.com/three/build/three.module.js
)?To Reproduce
Steps to reproduce the behavior:
Code
Expected behavior
Successful import.
The text was updated successfully, but these errors were encountered: