Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## next #5650 +/- ##
==========================================
- Coverage 83.57% 76.78% -6.79%
==========================================
Files 11 11
Lines 1924 1943 +19
Branches 707 712 +5
==========================================
- Hits 1608 1492 -116
- Misses 283 388 +105
- Partials 33 63 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
We should start it in webpack-dev-middleware, currently |
0d79407 to
8664549
Compare
| */ | ||
| setupProgressPlugin() { | ||
| // In the case where there is no compiler and it’s not being used as a plugin. | ||
| if (this.compiler === undefined) return; |
There was a problem hiding this comment.
Ideally we should always have compiler here, so we can use /* {Compiler} */ (this.compiler) to say typescript we have it is
|
|
||
| let started = false; | ||
|
|
||
| this.compiler.hooks.watchRun.tapPromise(pluginName, async () => { |
There was a problem hiding this comment.
I think we should use another hook here, we should:
- Start dev server after the first compilation happend
- We should use hook when
CleanPluginwill remove old files and webpack will not write new files, why? Because we are using memory fs here, old assets should be removed and new assets should be written to memory
There was a problem hiding this comment.
I’m going to use the afterEmit hook
There was a problem hiding this comment.
@bjohansebas let's also add a test case with output.clean: true to ensure we work as expected
d8084a7 to
9890a76
Compare
| await new Promise((resolve) => { | ||
| compiler.close(resolve); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Let's add full plugin tests, where dev server plugin is a part of plugins in webpack.config.js, also let's add a test case for clean: true, these tests not fully test our plugin logic, also in future we will need to rewrite all our tests to the plugin support (not in this pr, but for future), so let's start is here (and if we need required helpers)
Summary
What kind of change does this PR introduce?
Did you add tests for your changes?
Does this PR introduce a breaking change?
If relevant, what needs to be documented once your changes are merged or what have you already documented?