-
Notifications
You must be signed in to change notification settings - Fork 687
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
Fix dev server unhandled error #2420
Conversation
Fix an unhandled error wherein the dev server attempts to read tap into the webpack compilation to read GraphQL query files. It looks like the shape of an argument changed somewhere.
/** | ||
* Stats in an array because we have 2 webpack child | ||
* compilations, 1 for client and other for service worker. | ||
*/ |
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.
Is this still true? The argument to this function certainly wasn't an array; perhaps this is still the case in production, though?
Also, the argument to this function appears to be Stats {}
itself. I don't see how we could have ever been destructuring stats
from the argument in the first place.
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.
Nice catch @jimbo. We changed the webpack config to only have 1 compilation during the build process. It is weird that, we never had tests around this. Can we add a test to replicate this?
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.
Funny, the tests failed now. May be we were mocking stuff and using that to test the plugin. Hence it never failed when I changed the webpack.config.js
in #2390.
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.
Fixed!
|
Performance Test Results The following fails have been reported by WebpageTest. These numbers indicates a possible performance issue with the PR which requires further manual testing to validate. https://pr-2420.pwa-venia.com : LH Performance Expected 0.85 Actual 0.57, LH Best Practices Expected 1 Actual 0.92 |
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.
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 fixes a problem with graphiql. We need this urgently!
Description
Fix an unhandled error wherein the dev server attempts to read tap into the webpack compilation to read GraphQL query files. It looks like the shape of an argument changed somewhere.
Related Issue
Maybe related to PWA-169.
Acceptance
Verification Stakeholders
Specification
Verification Steps
yarn watch:venia
Screenshots / Screen Captures (if appropriate)
Checklist
[ ] I have added tests to cover my changes, if necessary.