haideralii / playwright-lighthouse-test

5 stars 1 forks source link

[question]: import the lighthouse config #2

Open stevez opened 1 year ago

stevez commented 1 year ago

can you explain this line, why it is ended with js?

import desktopConfig from 'lighthouse/lighthouse-core/config/desktop-config.js';

https://github.com/haideralii/playwright-lighthouse-test/blob/afb583a66e0854cc4d0fec7a76088f9357233609/tests/lighhouse-performance-test.spec.ts#L3

ArCiGo commented 7 months ago

I'm not the repo's owner, but I suspect it finishes with .js because of the JS/TS compiler (probably some of the npm packages are using ESNext).

On the other hand, that line can be moved to the helpers.ts file.

Arghajit47 commented 1 month ago

The issue is that for the newer version the file location has been changed to 'lighthouse/core/config/desktop-config.js'; But still I believe you will face some issue.