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: Paths are relative instead of absolute #367

Closed
Amerlander opened this issue Aug 24, 2022 · 3 comments
Closed

Bug: Paths are relative instead of absolute #367

Amerlander opened this issue Aug 24, 2022 · 3 comments

Comments

@Amerlander
Copy link

I've just upgraded a project from sveltekit 3xx to 4xx. The formerly absolute paths created by imagetools are now relative (to /) and therefore not working on any subpage.

<script>
	import Img from './image.jpg?webp&meta'
</script>

{Img.src}

will result in

./_app/immutable/assets/image-a774634e.webp

In dev mode everything works, but as soon as I build the path is wrong.
Before the upgrade the result was /_app/immutable/assets/image-a774634e.webp for {Img.src}. So without the leading ..

Repro

@benmccann
Copy link
Collaborator

This sounds unlikely to be related to imagetools and more likely related to sveltejs/kit#4250

@JonasKruckenberg
Copy link
Owner

I will close this issue then, seems indeed not like something imagetools can change

@benmccann
Copy link
Collaborator

This may be from imagetools after all. Can you check if #400 would fix the issue you're facing?

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

3 participants