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

--start-server-command #37

Closed
paulirish opened this issue Oct 29, 2019 · 2 comments
Closed

--start-server-command #37

paulirish opened this issue Oct 29, 2019 · 2 comments

Comments

@paulirish
Copy link
Member

carrying over from https://github.com/GoogleChrome/web.dev/pull/1757/files#r339844263 .....

zeit used to allow you to run your own webserver (they're now just static site and serverless functions).. but at the time they'd look for a now-start npm script first.. and if not they'd use a start npm script.

that's one option here too.. we look for start:lhci followed by start. if there's neither we log an error.

One downside here in doing all this automagically is that we don't really know exactly how long to wait after starting the server before we can begin collecting. i guess some sites have complicated servers that don't kick off instantly?

@patrickhulce
Copy link
Collaborator

There was discussion about this in a thread with surma, but tl;dr I very strongly argued against doing any of regular command detection automatically (i.e. automatically using npm start). Most of the servers provided by framework CLIs do not serve production assets and/or do not provide realistic production environment settings like asset compression (preact is the only one I know of that does this). Almost no one will know to look for this and they'll be much worse off than following the npm run build && lhci autorun method.

Automatically supporting a start:lhci seems like a good compromise to me 👍

@patrickhulce
Copy link
Collaborator

fixed by #46

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

No branches or pull requests

2 participants