-
Notifications
You must be signed in to change notification settings - Fork 33
Allow running lighthouse on other pages available in publish folder #487
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
Allow running lighthouse on other pages available in publish folder #487
Conversation
…ghthouseOnRoutesAvailableInPublishFolder
👷 Deploy Preview for plugin-lighthouse processing.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks great
Regarding the README, I feel like the reasoning for having this new option isn't explained as much as it could be, and the option name could maybe be tweaked (disclaimer, it's still confusing to me!)
I thought this work was achieving something different than being able to directly address (html) files, although this work does also fix the problem I though we were aiming for so it's all looking good!
Example
Before: This 11ty site deploy – if you go to the second lighthouse report and look at the report, it mentions missing styles/scripts etc. Also note the scores aren't great. This was run with path = posts/
. As express is serving the /posts
page directly as the site root (this is what the path currently means), links to assets outside the posts directory break.
After: This follow-up deploy was run with fileName = posts/
(no path set), and the second report in that deploy now has all assets available, the screenshots look fixed, and the scores are back up where they should be. Express is running the site from the root directory, then we're looking into the sites posts
directory using fileName. All the asset paths are correct and reachable as the site is running from the root directory. A valid fileName
value could be posts/category/date/title
, which doesn't fit too well with being a "file name"
I think:
- path = where should I start up the server
- fileName = from path, where shall I look for the actual file to test – does "fileName" still work here?
Urgh, I meant to comment, not reject. Happy to resubmit as approved if you'd rather update docs etc as a follow-on |
Now I think about it more, should we be de-emphasising the use of |
This is all great context thank you @jackbrewer!
Yes I think this is the right distinction, and no I don't think the current names reflect it well 😂 What I would like to change these to is:
What do you think? It feels a bit wrong that
|
I also think this approach is clearer! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good 😄
@@ -273,13 +275,16 @@ module.exports = { | |||
inputs, | |||
}); | |||
|
|||
console.log('------', audits); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aitchiss I noticed this appearing in the deploy logs, not sure if it was intentional?! I didn't spot it in the review 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
Allows users to target pages in the given directory other than
index.html
. Also removes the need to pass an empty string forpath
if targeting the top-level serve directory.Closes https://github.com/netlify/pillar-workflow/issues/860