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

fix live reload #358

Open
zugdev opened this issue Nov 13, 2024 · 3 comments · May be fixed by #359
Open

fix live reload #358

zugdev opened this issue Nov 13, 2024 · 3 comments · May be fixed by #359

Comments

@zugdev
Copy link
Contributor

zugdev commented Nov 13, 2024

This is the same as in work.ubq.fi check this issue.

This repo's package.json start command uses wrangler pages to serve instead of esbuild-server:

"serve": "npx wrangler pages dev static --port 8080"

This killed the live reload feature, and according to this issue in wrangler's repo we have to pass in a directory after wrangler pages dev to hear changes from. Wrangler only looks specifically inside the directory given (non-recursive), in this case static, so even though HTML changes are captured, typescript ones aren't. Therefore it is extremely unreliable to get global ts changes. So I wrote an observer using esbuild API that watches and rebuilds based on file change. This spec might be a lil weird because I am extremely tired as I write it.

@zugdev
Copy link
Contributor Author

zugdev commented Nov 22, 2024

@0x4007 bot didn't auto decide price here, repo config?

@0x4007
Copy link
Member

0x4007 commented Nov 22, 2024

I'm not sure maybe it's broken temporarily

@Keyrxng
Copy link
Member

Keyrxng commented Nov 22, 2024

I'm not sure maybe it's broken temporarily

It'll be a worker URL mismatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants