GoogleChromeLabs / estimator.dev

🧮 Calculate the size and performance impact of switching to modern JavaScript syntax.
https://estimator.dev
Apache License 2.0
665 stars 23 forks source link

Analyze a local website on localhost #20

Open Drarig29 opened 3 years ago

Drarig29 commented 3 years ago

It seems it's not possible to analyse a local website.

I tried to clone the repo, launch the firebase emulator and the frontend. But I get this error when I click on Analyze with my localhost URL :

Failed to load resource: net::ERR_BLOCKED_BY_CLIENT      (www.google-analytics.com/collect:1)

Would it be possible to make it work in some way?

developit commented 3 years ago

That log isn't an error, it's just a warning that google-analytics was blocked (third party scripts are blocked because they're usually meaningless within the context of this tool).

What do you see when you enter the URL to analyze?

Drarig29 commented 3 years ago

It just does nothing. When I enter the URL of my website on the localhost, I don't have any logs or anything except for the Google analytics warning.

developit commented 3 years ago

I think the correct solution here isn't to make dev mode support localhost, it will be to provide a command-line version of this tool that has access to localhost in the first place.