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

BUG #100

Open
pflagerd opened this issue Oct 22, 2023 · 0 comments
Open

BUG #100

pflagerd opened this issue Oct 22, 2023 · 0 comments

Comments

@pflagerd
Copy link

pflagerd commented Oct 22, 2023

Describe the bug
As of 7bbaf74, downloading the code example using the NPM import style from this page produces a file containing cdn.skypack.dev URLs for some imports rather than using npm-aware imports.

To Reproduce
Steps to reproduce the behavior:

  1. From a browser, navigate to https://discoverthreejs.com/book/introduction/about-the-book/
  2. Make sure the Import Style by the live code editor on the right side of the page is set to NPM (default)
  3. Toggle the slider to the ON position
  4. Observe the cool sparkleHorse being rendered.
  5. Observe that the sparkleHorse.js file's first line is import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'; as expected.
  6. Download the code using the Download as Zip icon.
  7. Unzip the downloaded .zip file
  8. Find the sparkleHorse.js file and observe that its first line is import { GLTFLoader } from 'https://cdn.skypack.dev/[email protected]/examples/jsm/loaders/GLTFLoader.js'; contrary to expectations

Expected behavior
If the NPM Import Style is selected, expect the downloaded .zip file to exactly match the code displayed in the live code editor.

Desktop (please complete the following information):

  • OS: Linux (OpenSUSE 15.4)
  • Browser: Chrome/Chromium
  • Version: 118.0.5993.88 (Official Build) (64-bit)
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

1 participant