Skip to content

feat: add --client-need-client-entry and --client-need-hot-entry #3228

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

Closed
wants to merge 3 commits into from

Conversation

snitin315
Copy link
Member

@snitin315 snitin315 commented Apr 26, 2021

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Yes.

Motivation / Use-Case

Addded -

  • --client-need-client-entry
  • --no-client-need-client-entry
  • --client-need-hot-entry
  • --no-client-need-hot-entry

Breaking Changes

None

Additional Info

No

@@ -123,6 +123,41 @@ module.exports = {
delete opts.clientOverlay;
},
},
{
name: 'client-need-client-entry',
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we need a better name, double client can be confusing.

Copy link
Member

Choose a reason for hiding this comment

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

Yep, good catch I will think about it

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe:

client: {
   appendDefaultEntries: true,
   appendHotEntries: true
}

Copy link
Member

Choose a reason for hiding this comment

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

hm, give me time to think about these options, maybe we need { client: (entry) => { return clientOption; } }, so you will setup hot/client entry for multiple entrypoints

@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #3228 (948b804) into master (1997a6e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3228   +/-   ##
=======================================
  Coverage   95.19%   95.19%           
=======================================
  Files          37       37           
  Lines        1248     1248           
  Branches      352      352           
=======================================
  Hits         1188     1188           
  Misses         54       54           
  Partials        6        6           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1997a6e...948b804. Read the comment docs.

@alexander-akait
Copy link
Member

alexander-akait commented May 13, 2021

@snitin315 I found solution:

  • let's rename needHotEntry -> hotEntry: boolean (--client-hot-entry), default value const hotEntry = options.client.hotEntry || options.hot
  • let's remove needClientEntry in favor client: boolean | ClientOptions | function(entryName): ClientOptions, so you can disable hotEntry or whole client by entries using function (--client and --no-client)

Maybe in future we will allow to write to only specific client (we already have this information internally, nobody ask this, so let's postpone)

@snitin315
Copy link
Member Author

Nice solution. I will update 👍

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.

3 participants