Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: new CLI options API for serve #2754

Merged
merged 5 commits into from
Jun 5, 2021

Conversation

alexander-akait
Copy link
Member

What kind of change does this PR introduce?

feature

Did you add tests for your changes?

Exist, but only work after merge webpack/webpack-dev-server#3325

If relevant, did you update the documentation?

No need

Summary

New API for CLI options

Does this PR introduce a breaking change?

No

Other information

I think we should refactor serve and put startDevServer.ts in index.ts to avoid extra require (but it is not problem, because require is cachable). Also we will avoid a lot of for/reduce/forEach after #2626, but I want postpone it right now, focus on webpack-dev-server

@alexander-akait alexander-akait requested a review from a team as a code owner June 3, 2021 16:29
anshumanv
anshumanv previously approved these changes Jun 3, 2021

const options =
typeof devServer.getArguments === "function"
? devServer.getArguments(webpack)
Copy link
Member

Choose a reason for hiding this comment

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

nice

@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #2754 (31e52ba) into master (da7dff2) will decrease coverage by 1.70%.
The diff coverage is 24.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2754      +/-   ##
==========================================
- Coverage   95.96%   94.25%   -1.71%     
==========================================
  Files          31       31              
  Lines        1634     1672      +38     
  Branches      476      487      +11     
==========================================
+ Hits         1568     1576       +8     
- Misses         66       96      +30     
Impacted Files Coverage Δ
packages/serve/src/index.ts 65.09% <24.39%> (-26.09%) ⬇️
packages/webpack-cli/lib/webpack-cli.js 96.74% <0.00%> (ø)
packages/generators/src/addon-generator.ts 93.10% <0.00%> (+1.72%) ⬆️

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 da7dff2...31e52ba. Read the comment docs.

@alexander-akait
Copy link
Member Author

Please ignore coverage, it will be fixed after update webpack-dev-server

snitin315
snitin315 previously approved these changes Jun 4, 2021
anshumanv
anshumanv previously approved these changes Jun 4, 2021
@alexander-akait alexander-akait merged commit bb7c9d3 into master Jun 5, 2021
@alexander-akait alexander-akait deleted the feat-improve-cli-args-for-serve branch June 5, 2021 13:21
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants