-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Improve --plugins
resolution algorithm
#9050
Comments
Thanks for filing and being such an early adopter! :D The behavior you'd like is the current intended behavior and the A few notes:
Right now I get this to work by doing
Our algorithm is If I edit your plugin locally back to |
Thank you for a kind detailed reply! You are absolutely right! I've just found the typo in our Great tip with |
First of all, thank you for adding the way to define plugins. It's a fantastic feature!
We've just published the lighthouse-plugin-field-performance and discovered a few issues with
--plugins
resolution algorithm.The story:
lighthouse-plugin-field-performance
with all the related code.--plugins
algorithm does not recognizepackage.json
'smain
field and can't find the code. So we used the exact structure from the recipe andln -s ../ node_modules/lighthouse-plugin-field-performance
a symlink to use the current directory as a part of node_modules.plugin.js
is a wrong name since it can only resolveindex.js
.The whole story explained with commit messages:

Conclusion
In order to make the development of the plugins more straightforward, it would be great to improve
--plugins
resolution algorithm by adding support forpackage.json
'smain
field and checking if the current folder is a lighthouse plugin. (for example, checking the name inpackage.json
).The text was updated successfully, but these errors were encountered: