-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationready to implementplease submit PRs for these issues!please submit PRs for these issues!
Description
Describe the bug
The official SvelteKit documentation for the new image preprocessor (introduced with c52aab6) provides an incorrect example for the asset import statement:
<script>
import { MyImage } from './path/to/your/image.jpg?enhanced';
</script>This throws a 500 server error. Instead, the import statement should be:
<script>
import MyImage from './path/to/your/image.jpg?enhanced';
</script>Reproduction
https://github.com/fubits1/sveltekit-enhanced-img/blob/main/src/routes/%2Bpage.svelte
Logs
No response
System Info
System:
OS: Linux 6.5 Ubuntu 23.10 23.10 (Mantic Minotaur)
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 18.01 GB / 31.20 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 20.8.1 - ~/.nvm/versions/node/v20.8.1/bin/node
npm: 10.2.2 - ~/.nvm/versions/node/v20.8.1/bin/npm
pnpm: 8.10.2 - ~/.nvm/versions/node/v20.8.1/bin/pnpm
bun: 1.0.7 - ~/.nvm/versions/node/v20.8.1/bin/bun
Browsers:
Brave Browser: 119.1.60.114
Chrome: 120.0.6090.0
Chromium: 119.0.6045.123Severity
annoyance
Additional Information
No response
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationready to implementplease submit PRs for these issues!please submit PRs for these issues!