-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(Server): exclude client scripts for node
targets
#1441
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
Conversation
I saw another PR about this: #1338 |
Codecov Report
@@ Coverage Diff @@
## master #1441 +/- ##
==========================================
- Coverage 79.27% 76.35% -2.93%
==========================================
Files 6 6
Lines 497 499 +2
Branches 161 163 +2
==========================================
- Hits 394 381 -13
- Misses 103 118 +15
Continue to review full report at Codecov.
|
@@ -68,6 +68,7 @@ function Server(compiler, options, _log) { | |||
} | |||
|
|||
const addCompilerHooks = (comp) => { | |||
if (!['async-node', 'node'].includes(comp.options.target)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to prevent websocket to not emit node
target specific hashes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add test
@evilebottnawi Did you read the description? 😄
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests
@EloB oh sorry, i don't have time right now for this 😞 maybe someone other can help with this |
@evilebottnawi No worry 😄👍 Lets hope someone has time! |
node
targets
@EloB See https://github.com/webpack/webpack-dev-server/pull/1338/files#diff-5e0bdc9fe7d56299ec06583d181360a5 for a test case and as a starting point :) |
Codecov Report
@@ Coverage Diff @@
## master #1441 +/- ##
==========================================
- Coverage 79.27% 76.35% -2.93%
==========================================
Files 6 6
Lines 497 499 +2
Branches 161 163 +2
==========================================
- Hits 394 381 -13
- Misses 103 118 +15
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #1441 +/- ##
==========================================
- Coverage 79.27% 76.35% -2.93%
==========================================
Files 6 6
Lines 497 499 +2
Branches 161 163 +2
==========================================
- Hits 394 381 -13
- Misses 103 118 +15
Continue to review full report at Codecov.
|
If I have some time over this weekend I will try to fix this. I really want that hot reloading on server side :) |
@EloB friendly ping |
I'm looking to rebase this PR and write some tests for your PR so it can be merged in. Do you have a sample use-case/webpack config for the websocket emission issue? I don't think it's a good either to simply skip the compilation hooks in case some plugins rely on them to function. |
@jojo-apollo why we need test websocket emission issue here? |
@jojo-apollo maybe we can test this manually |
It's difficult to test if we don't know his exact use case, my I just want to confirm if it's an issue with way he wrote his webpack config (and he's configured or used it wrong). |
@jojo-apollo let's wait 72 hours on answer and feel free to recreate PR |
I managed to write a isomorphic webpack config without any changes or plugins with hot reload on both backend and frontend. When I have time I might be able to publish it. |
Type
Issues
node
targets #1338SemVer