-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: remove CLI progress and move progress option into client #2857
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
Changes from all commits
ddfb1f6
1155e23
d23c4ee
0a7b363
0c89036
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,21 +21,25 @@ module.exports = { | |
| negative: true, | ||
| }, | ||
| { | ||
| name: 'profile', | ||
| name: 'client-progress', | ||
| type: Boolean, | ||
| describe: 'Print compilation profile data for progress steps', | ||
| }, | ||
| { | ||
| name: 'progress', | ||
| type: Boolean, | ||
| describe: 'Print compilation progress in percentage', | ||
| describe: 'Print compilation progress in percentage in the browser', | ||
| group: BASIC_GROUP, | ||
| processor(opts) { | ||
| opts.client = opts.client || {}; | ||
| opts.client.progress = opts.clientProgress; | ||
| delete opts.clientProgress; | ||
| }, | ||
| }, | ||
| { | ||
| name: 'hot-only', | ||
| type: Boolean, | ||
| describe: 'Do not refresh page if HMR fails', | ||
| group: ADVANCED_GROUP, | ||
| processor(opts) { | ||
| opts.hot = 'only'; | ||
| delete opts.hotOnly; | ||
| }, | ||
| }, | ||
| { | ||
| name: 'setup-exit-signals', | ||
|
|
@@ -73,6 +77,11 @@ module.exports = { | |
| group: DISPLAY_GROUP, | ||
| describe: | ||
| 'Log level in the browser (none, error, warn, info, log, verbose)', | ||
| processor(opts) { | ||
| opts.client = opts.client || {}; | ||
| opts.client.logging = opts.clientLogging; | ||
| delete opts.clientLogging; | ||
| }, | ||
| }, | ||
| { | ||
| name: 'https', | ||
|
|
@@ -106,7 +115,6 @@ module.exports = { | |
| describe: 'Enable gzip compression', | ||
| group: RESPONSE_GROUP, | ||
| }, | ||
| // findPort is currently not set up | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why did you comment out?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The TODO was resolved in #2845.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ylemkimon Can we remove this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @evilebottnawi Do you mean removing
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, my mistake, all is fine |
||
| { | ||
| name: 'port', | ||
| type: Number, | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ class Server { | |
| this.options | ||
| ); | ||
|
|
||
| if (this.options.progress) { | ||
| if (this.options.client.progress) { | ||
| this.setupProgressPlugin(); | ||
| } | ||
| this.setupHooks(); | ||
|
|
@@ -83,12 +83,6 @@ class Server { | |
| } | ||
|
|
||
| setupProgressPlugin() { | ||
| // for CLI output | ||
| new webpack.ProgressPlugin({ | ||
| profile: !!this.options.profile, | ||
| }).apply(this.compiler); | ||
|
|
||
| // for browser console output | ||
| new webpack.ProgressPlugin((percent, msg, addInfo) => { | ||
| percent = Math.floor(percent * 100); | ||
|
|
||
|
|
@@ -569,8 +563,8 @@ class Server { | |
| this.sockWrite([connection], 'liveReload'); | ||
| } | ||
|
|
||
| if (this.options.progress) { | ||
| this.sockWrite([connection], 'progress', this.options.progress); | ||
| if (this.options.client.progress) { | ||
| this.sockWrite([connection], 'progress', this.options.client.progress); | ||
| } | ||
|
|
||
| if (this.options.clientOverlay) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just realized this should be
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, let's fix it in the separate PR |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.