-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Move renderer bundle (for devtools) to use ES module exports #11628
Comments
After discussion: we plan to change our bundling so that we'll expose the renderer/report-generator via a ESM |
Note that we are blocked on GoogleChrome/lighthouse#11628 to fully run TypeScript on this file. [email protected] Bug: 1011811 Change-Id: I475d7c80c366f9599b695f6a4e961117ae363391 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2547288 Commit-Queue: Tim van der Lippe <[email protected]> Auto-Submit: Tim van der Lippe <[email protected]> Reviewed-by: Paul Lewis <[email protected]>
@TimvdLippe WIP here, requesting some feedback/help. https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2939422/1#message-5216dc86d872fa96a921b4a2cbd330c7f94dc3b7 |
I am working on trying to run TypeScript on the
front_end/lighthouse
files in DevTools, but I am running into several problems. Most prominently, LightHouse puts several types on the global scope, such asReportRenderer
andReportUIFeatures
(see the declarations in https://source.chromium.org/chromium/chromium/src/+/master:third_party/devtools-frontend/src/front_end/lighthouse/LighthouseReporterTypes.js;l=28-30;drc=1e10f8546c3cd94438e2046711e302a9dc771394)To make consumption easier for DevTools and potentially improve tree-shaking and all, could we consider changing the way LightHouse exports symbols to use ES exports instead? E.g. rather than putting symbols on the global scope, make them
export class
definitions that DevTools can then import. This should be possible, now that LightHouse is bundled and several other infrastructure improvements have been made on the DevTools side.The text was updated successfully, but these errors were encountered: