Skip to content
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

chore: convert dev server to webpack plugin #3850

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

rishabh3112
Copy link
Member

  • 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?

WIP

Motivation / Use-Case

Dev Server should be a plugin

Breaking Changes

Nope

Additional Info

N/A

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #3850 (11be35c) into master (d8cc133) will decrease coverage by 0.12%.
The diff coverage is 100.00%.

❗ Current head 11be35c differs from pull request most recent head 85d443a. Consider uploading reports for the commit 85d443a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3850      +/-   ##
==========================================
- Coverage   92.87%   92.75%   -0.13%     
==========================================
  Files          14       14              
  Lines        1334     1338       +4     
  Branches      467      468       +1     
==========================================
+ Hits         1239     1241       +2     
- Misses         87       89       +2     
  Partials        8        8              
Impacted Files Coverage Δ
lib/Server.js 93.67% <100.00%> (+0.02%) ⬆️
lib/servers/WebsocketServer.js 91.42% <0.00%> (-5.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 d8cc133...85d443a. Read the comment docs.

@rishabh3112 rishabh3112 marked this pull request as ready for review September 18, 2021 06:41
@rishabh3112
Copy link
Member Author

@alexander-akait let me know if there any custom hooks required to be implemented here.


let started = false;

compiler.hooks.watchRun.tapPromise(pluginName, async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

We should enable watch before taping into watchRun hook.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, plugin should work only for webpack watch/webpack serve, but I am afraid it is so late to override fs, need think more about it

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Yep, in my roadmap on the next week

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.

None yet

2 participants