-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Unlighthouse Generates Reports for Root Route Instead of Specified Routes with Hash Routing enabled in Angular Single Page Application #257
Comments
It actually only creates one report for the first specified hash route and ommits the reports for the other routes.
Debug log:
|
Hi, thanks for the detailed issue. I've pushed up a fix for this in that it will avoid normalising the hash when the hash starts with a I'm not too sure if this will correctly crawl all links but it should allow you to manually specify the paths to scan. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Details
Hi,
I am encountering an issue when using Unlighthouse with an Angular application that uses hash routing.
https://angular.dev/guide/routing/common-router-tasks#hashlocationstrategy
When I specify multiple routes for benchmarking, Unlighthouse generates one report for each specified route (OK).
However, all of the generated reports are for the root route (localhost:4200/) instead of the specified hash routes.
In the report, all the "whitened" screenshots in the screenshot timeline of the reports are displaying the same content & scores across the reports, as the same route was benchmarked.
The routes are available when i visit them via my normal chrome browser.
I also tried specifying the full URLs, same result.
When i disable hash routing via angular and change the URLs in the unlighthouse config accordingly, it works fine.
The problem is that I am not able to disable hash routing for my angular application, so this solution would not be possible for me.
When i open chrome via CLI, it also opens the expected route as expected
chrome.exe http://localhost:4200/#/dummy
Is this a known bug, or am I missing some configuration? How can I ensure that Unlighthouse generates reports for the actual specified routes instead of the root route?
BR,
Vincent
CLI Log:
scripts:
Version used: 0.14.1
unlighthouse.config.ts:
Report:
The text was updated successfully, but these errors were encountered: