Skip to content

core(extension): extract a new ext-bg file, splitting extn/devtools usecases#4162

Merged
patrickhulce merged 2 commits intomasterfrom
extract-lh-ext-bg
Jan 3, 2018
Merged

core(extension): extract a new ext-bg file, splitting extn/devtools usecases#4162
patrickhulce merged 2 commits intomasterfrom
extract-lh-ext-bg

Conversation

@paulirish
Copy link
Member

@paulirish paulirish commented Jan 2, 2018

Cut-paste job except for:

  • updateBadgeFn passed as arg into runLighthouseForConnection
  • lighthouseIsRunning is set within the updateBadgeUI method now

fixes #2014 (along with #4161)

@paulirish paulirish changed the title core(extension): extract a new ext-bg file, splitting extension/devtools usecases core(extension): extract a new ext-bg file, splitting extn/devtools usecases Jan 2, 2018
@paulirish
Copy link
Member Author

paulirish commented Jan 2, 2018

After these two PRs, the total lighthouse-background file size drops from 2.75MB to 2.56MB. (which is 7.42% smaller). This is pre-minify, pre-gzip size.

bundlesize sez this about the post-minify, post-gzip size:
image

And obviously this also means that we have two compiled files:

  • lighthouse-background.js: used by devtools
  • lighthouse-ext-background.js: used by chrome extension and LRider

I'm open to other filenames if we want to bikeshed that.

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@patrickhulce
Copy link
Collaborator

FYI @jianzhoufeng LRider will need to use the lighthouse-ext-background moving forward after this change

@patrickhulce patrickhulce merged commit f6234d0 into master Jan 3, 2018
@patrickhulce patrickhulce deleted the extract-lh-ext-bg branch January 3, 2018 20:50
@jianzhoufeng
Copy link
Contributor

Got it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lighthouse-background contains un-minified report-renderer v2

4 participants