-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature Request: Only run in dev mode #1
Comments
@lws803 If you think it's a worthwhile improvement and I haven't missed anything, I might raise an MR - is that ok? |
Hi @henricook apologies for the late response! Been pretty slow on the uptake here as I was busy with work 😅. Oh this use case is pretty interesting, mind if I ask why you'd prefer to run it on dev instead of production / both? 🙂 Either way, happy to accept an MR for this. Feel free to open one up and I'll take a look! |
@lws803 I think that in prod it's all built, so there's nothing to warm up, so the server would be hitting itself for no reason - have I understood correctly? |
Oh that's correct, the pages are all built and served to the client (if they're not server rendered) but the APIs aren't. Those are serverless and only spin up with a small warm up delay when they're called 🙂. That's why this hook was built to ensure these API routes / server-side rendered pages are called and warmed up in advance. |
Ahhh I see, that fills a gap in my knowledge thanks - so perhaps just an optional config flag for dev-only behaviour, great! I'll MR it in the next ~couple of weeks |
No problem! Looking forward to that MR then 🙂 feel free to ping me when you have it opened! |
This looks great, just what I'm looking for for my next app. It looks like it would currently run even in Production mode though (i.e. after an
npm run build
) - could it be changed to only run in dev mode, or have a flag for that?The text was updated successfully, but these errors were encountered: