-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
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:
- From a browser, navigate to https://discoverthreejs.com/book/introduction/about-the-book/
- Make sure the Import Style by the live code editor on the right side of the page is set to NPM (default)
- Toggle the slider to the ON position
- Observe the cool sparkleHorse being rendered.
- Observe that the sparkleHorse.js file's first line is
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
as expected. - Download the code using the Download as Zip icon.
- Unzip the downloaded .zip file
- 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)
Metadata
Metadata
Assignees
Labels
No labels