pygbag icon indicating copy to clipboard operation
pygbag copied to clipboard

Use relative paths for imports on test server?

Open StevenClontz opened this issue 9 months ago • 1 comments

Thanks for the cool project!

I tried to experiment with this library using a GitHub Codespace today. It seems that when I run pygbag test, the test server spins up and I'm able to visit the page, which is stuck on "Downloading..."

Image

It appears that the culprit is that several javascript files are failing to load

Image

Of course, that's because while the app is hosted at localhost on the machine, it's being accessed on my actual laptop via a proxy like didactic-space-computing-machine-5g66g9gq9rc44j7-8000.app.github.dev. Naively, I'd expect this would be fixed by using a relative path rather than an absolute URL. Alternatively, being able to provide the proxy URL might be a solution as well.

StevenClontz avatar Feb 25 '25 18:02 StevenClontz

maybe try to point --cdn to pygbag (localhost:8000) redirected to the port on ssl proxy, dont forget the ending "/" on proxy cdn url.

pmp-p avatar Feb 27 '25 01:02 pmp-p