Skip to content

refactor: log publicPath info #883

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 1 commit into from
Closed

refactor: log publicPath info #883

wants to merge 1 commit into from

Conversation

snitin315
Copy link
Member

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

For webpack/webpack-dev-server#3218

Breaking Changes

Maybe

Additional Info

None

@snitin315 snitin315 requested a review from hiroppy as a code owner April 24, 2021 03:01
@codecov
Copy link

codecov bot commented Apr 24, 2021

Codecov Report

Merging #883 (0c9bcd5) into master (64b8dde) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #883   +/-   ##
=======================================
  Coverage   98.58%   98.59%           
=======================================
  Files          10       10           
  Lines         282      284    +2     
  Branches       99      101    +2     
=======================================
+ Hits          278      280    +2     
  Misses          4        4           
Impacted Files Coverage Δ
src/utils/getPaths.js 100.00% <100.00%> (ø)

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 64b8dde...0c9bcd5. Read the comment docs.

@snitin315 snitin315 marked this pull request as draft April 24, 2021 03:14
@@ -12,6 +12,10 @@ export default function getPaths(context) {
? compilation.getPath(compilation.outputOptions.publicPath)
: '';

if (publicPath) {
context.logger.info(`webpack output is served from "${publicPath === 'auto' ? '/' : publicPath}" URL`);
}
Copy link
Member

Choose a reason for hiding this comment

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

It will be spam on each request, we need move it only on constructor place

Copy link
Member Author

Choose a reason for hiding this comment

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

I will update 👍🏻

@alexander-akait
Copy link
Member

I was wrong, I think we don't need this logging, it is weird, because publicPath can be Function or/and can contain [hash]/[fullhash], so our logging will be weird or invalid, I think docs are enough

@snitin315
Copy link
Member Author

So we just remove this logging from dev-server ?

@alexander-akait
Copy link
Member

Yes, I think most of developers see these messages like spam, so let's remove it, I don't think we create problem here removing this, also plugins can change publicPath too, so we know real publicPath only after compilation

@snitin315
Copy link
Member Author

Makes sense 👍

@snitin315 snitin315 closed this Apr 26, 2021
@snitin315 snitin315 deleted the public-path branch April 26, 2021 16:10
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.

2 participants