Skip to content

Conversation

@evenstensberg
Copy link
Member

  • This is a bugfix
  • [x?] 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?

No

Motivation / Use-Case

When the proxy property target is undefined, the user doesn't know, and it's nice to know its being skipped.

Breaking Changes

No

Additional Info

:)

@codecov
Copy link

codecov bot commented Aug 14, 2021

Codecov Report

Merging #3647 (b3f0be3) into master (78594da) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3647   +/-   ##
=======================================
  Coverage   93.87%   93.88%           
=======================================
  Files          15       15           
  Lines        1289     1291    +2     
  Branches      443      443           
=======================================
+ Hits         1210     1212    +2     
  Misses         72       72           
  Partials        7        7           
Impacted Files Coverage Δ
lib/Server.js 93.86% <100.00%> (+0.01%) ⬆️

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 1841c58...b3f0be3. Read the comment docs.

return createProxyMiddleware(context, proxyConfig);
}
this.logger.warn(
`The "target" value specified in the "proxy" property ${context} is not defined and will be skipped.`
Copy link
Member

Choose a reason for hiding this comment

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

for better visibility

Suggested change
`The "target" value specified in the "proxy" property ${context} is not defined and will be skipped.`
`The "target" value specified in the "proxy" property "${context}" is not defined and will be skipped.`

Can you also add a simple test case in https://github.com/webpack/webpack-dev-server/blob/master/test/server/proxy-option.test.js ?

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Bad idea, we should allow to use proxy without target, it is valid case

@alexander-akait
Copy link
Member

WIP on fix

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