-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
docs(plugins): update plugin developer docs wrt NODE_PATH #10028
Conversation
`\`${moduleIdentifier}\`. | ||
Tried to require() from these locations: | ||
${__dirname} | ||
${cwdPath}`; |
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.
we might also spit out NODE_PATH
, if it is set. L175 tries all of that.
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.
Sounds good. I started this but i'm going to split into a separate PR because NODE_PATH from the node side starts to get pretty complex.
oops 👀 |
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.
some nice quality improvements! 👍
docs/plugins.md
Outdated
@@ -231,6 +231,8 @@ The following artifacts are available for use in the audits of Lighthouse plugin | |||
|
|||
While Lighthouse has more artifacts with information about the page than are in this list, those artifacts are considered experimental and their structure or existence could change at any time. Only use artifacts not on the list above if you are comfortable living on the bleeding edge and can tolerate unannounced breaking changes. | |||
|
|||
If you're interested in other data not mentioned here, please file an issue. We'd love to help. |
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.
If you're interested in other data not mentioned here, please file an issue. We'd love to help. | |
If you're interested in other page information not mentioned here, please file an issue. We'd love to help. |
maybe? data just felt a bit weird 🤷♂
2. Install the plugin as a (peer) dependency, parallel to `lighthouse`. | ||
3. Run `npx -p lighthouse lighthouse https://example.com --plugins=lighthouse-plugin-example --view` | ||
1. Install `lighthouse` (v5+) and the plugin `lighthouse-plugin-example`, likely as `devDependencies`. | ||
* `npm install -D lighthouse lighthouse-plugin-example` |
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.
TIL -D
isn't just yarn
followup from #9997 which recommended NODE_ENV but meant to recommend NODE_PATH.
Also some error message formatting
closes #9950 #9948