Skip to content

feat: implement dev server as plugin #3251

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 32 commits into from
Closed

Conversation

rishabh3112
Copy link
Member

@rishabh3112 rishabh3112 commented May 6, 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?

Motivation / Use-Case

The Dev Server should be implemented as a plugin for long run. This would simplify implementation of webpack serve as will give user more flexibility in multicompiler case.

The current implementation code present in DevServerPlugin.js implements few parts but still relies on Server.js to be applied.

I am currently implementing it separately at WebpackDevServerPlugin.js to simplify testing. Later on we will export only this plugin instead on Serve.js.

Breaking Changes

Yes, it would be a breaking change.

Additional Info

@alexander-akait suggested this feature. Rest, we can chat on this PR.

@rishabh3112 rishabh3112 changed the title chore: add stub [WIP] feat: implement dev server as plugin May 6, 2021
@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #3251 (84fa7f5) into master (cef3d85) will decrease coverage by 0.40%.
The diff coverage is 95.55%.

❗ Current head 84fa7f5 differs from pull request most recent head cf3da1c. Consider uploading reports for the commit cf3da1c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3251      +/-   ##
==========================================
- Coverage   95.72%   95.31%   -0.41%     
==========================================
  Files          33       33              
  Lines        1309     1259      -50     
  Branches      388      360      -28     
==========================================
- Hits         1253     1200      -53     
- Misses         52       55       +3     
  Partials        4        4              
Impacted Files Coverage Δ
lib/Server.js 95.66% <95.55%> (-0.63%) ⬇️
lib/servers/WebsocketServer.js 94.11% <0.00%> (-2.95%) ⬇️
client-src/index.js 90.56% <0.00%> (-0.51%) ⬇️
lib/utils/runOpen.js 97.36% <0.00%> (-0.14%) ⬇️
client-src/utils/parseURL.js 100.00% <0.00%> (ø)
lib/utils/createDomain.js 100.00% <0.00%> (ø)
lib/utils/normalizeOptions.js 100.00% <0.00%> (+1.61%) ⬆️
client-src/utils/createSocketURL.js 100.00% <0.00%> (+3.57%) ⬆️

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 84bd080...cf3da1c. Read the comment docs.

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.

Logic should be in apply function here https://github.com/webpack/webpack-dev-server/blob/master/lib/Server.js, no need to duplicate this, all method already exists in server

@rishabh3112
Copy link
Member Author

Logic should be in apply function here https://github.com/webpack/webpack-dev-server/blob/master/lib/Server.js, no need to duplicate this, all method already exists in server

Okay, I will make changes inplace then. I thought of doing it seperately to avoid breaking changes in release.

@rishabh3112
Copy link
Member Author

rishabh3112 commented May 12, 2021

Status

Waiting merge of #3273
WIP

@rishabh3112 rishabh3112 marked this pull request as ready for review May 17, 2021 10:09
@rishabh3112
Copy link
Member Author

rishabh3112 commented Jun 7, 2021

@alexander-akait what should I do next in this PR? I am done on my end 😅

@rishabh3112 rishabh3112 changed the title [WIP] feat: implement dev server as plugin feat: implement dev server as plugin Jun 7, 2021
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.

Can we avoid a lot of change, maybe better create a new PR

@rishabh3112
Copy link
Member Author

rishabh3112 commented Sep 14, 2021

Can we avoid a lot of change, maybe better create a new PR

Yup, will create a new PR for this now.

@rishabh3112 rishabh3112 deleted the feat/dev-server-plugin branch September 14, 2021 04:31
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