pyscript icon indicating copy to clipboard operation
pyscript copied to clipboard

Relative URLs not resolved properly from modules

Open WebReflection opened this issue 1 year ago • 1 comments

What happened?

Well, it looks like if we have relative URLs in module resolution these are all resolved from where the index.html or any x.html is running, as opposite of being resolved from where the current script is, demo here: https://pyscript.com/@agiammarchi/no-image/v1?files=js/image.js

This is both a bummer and a fully unexpected thing because it means we might need to hook into dynamic import URL resolution to provide the correct path to imported modules at runtime which might be easy or impossible, 2025 will tell us how bad is that.

WebReflection avatar Dec 19 '24 14:12 WebReflection

WARNING ongoing investigation as this apparently has nothing to do with PyScript or the way relative URLs are resolved in here ... keeping @FabioRosado in the loop but I think this is not on us.

WebReflection avatar Dec 19 '24 14:12 WebReflection