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

feat(collect): Make it easy to use with SPA #159

Merged
merged 4 commits into from Jan 6, 2020

Conversation

rdlabo
Copy link
Contributor

@rdlabo rdlabo commented Dec 19, 2019

Now we can't set both startServerCommand and staticDistDir.

ref: https://github.com/GoogleChrome/lighthouse-ci/blob/master/packages/cli/src/collect/collect.js#L100-L102

So server return 404 not found at sub-page in SPA.

I think isSinglePageApplication flag is very useful. (When using no SPA, 404 information is important)

Thanks.

closes #157

@rdlabo
Copy link
Contributor Author

rdlabo commented Dec 19, 2019

related: #157

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for the PR @rdlabo! Implementation looks great 🎉

Would you mind adding a test case? Preferably we have two, one for ensuring a missing file 404's when the flag is missing and one for ensuring a missing file returns the index page when the flag is there.

It might be overkill to test the entire collect pipeline for this so feel free to create a new fallback-server.test.js file

@rdlabo
Copy link
Contributor Author

rdlabo commented Dec 21, 2019

@patrickhulce Thanks for review. I added simple test case for isSinglePageApplication flag. Thanks!

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much!

@patrickhulce patrickhulce merged commit 04c8177 into GoogleChrome:master Jan 6, 2020
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

Successfully merging this pull request may close these issues.

Add SPA support to fallback server
3 participants