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.
What happened?
Well, it looks like if we have relative URLs in module resolution these are all resolved from where the
index.htmlor anyx.htmlis 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
importURL 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.