-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
refactor(dev): revert serving assets from dev server #6306
refactor(dev): revert serving assets from dev server #6306
Conversation
|
When sending HMR updates, the assumption was that serving assets from dev server would allow those updates to be sent immediately, without waiting for the app server to restart. But this isn't the case (e.g. if you navigate to another page that has a loader and the app server is rebooting, that loader fetch will fail).
9133202
to
bd6b29a
Compare
🤖 Hello there, We just published version Thanks! |
in case this debugging info is useful, i’m using the cloudflare-workers adaptor and found the following when running
|
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
When sending HMR updates, the assumption was that serving assets from dev server would allow those updates to be sent immediately, without waiting for the app server to restart. But this isn't the case (e.g. if you navigate to another page that has a loader and the app server is rebooting, that loader fetch will fail).
Idea moving forward is:
If you don't mind a bit of downtime from your app server during dev, then you can rely on Remix restarts. but you'll need to wait for app server to reboot before you hard refresh or click buttons that trigger actions, or navigate to different pages that need loaders.
if that amount of downtime is too much for you, using chokidar and purgeRequireCache w/ --no-restart and that will keep you zipping along with an always-up server.
Note: during rebuild there is no downtime, its only after rebuild but before app server restart that there is some downtime with (1)
^not serving assets from dev server also means there's less of a difference b/w dev and prod, which is nice. plus we don't have to use dataurls to handle svgs if we do that.