-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
#3780: Do not display wrong warning when loading ".js" or ".json" #4060
Conversation
lib/core/src/server/serverRequire.js
Outdated
@@ -84,7 +84,7 @@ export default function serverRequire(filePath) { | |||
|
|||
const moduleDescriptor = interpret.extensions[candidateExt]; | |||
|
|||
if (registerCompiler(moduleDescriptor) === 0) { | |||
if (moduleDescriptor !== null && registerCompiler(moduleDescriptor) === 0) { |
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.
So, is the problem only with a .json
? because there is already a check ☝️ for .js
.
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.
Yeah, you are right. My proposition to not show the warning when moduleDescriptor
is undefined
(no key in interpret.extensions
) or null
(as for .js
and .json
).
Codecov Report
@@ Coverage Diff @@
## master #4060 +/- ##
==========================================
+ Coverage 40.22% 40.24% +0.01%
==========================================
Files 467 467
Lines 5638 5636 -2
Branches 748 747 -1
==========================================
Hits 2268 2268
+ Misses 2994 2993 -1
+ Partials 376 375 -1
Continue to review full report at Codecov.
|
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.
Thanks. we are having some troubles with CI, once it fixed I will merge.
Can you please merge from master? |
Done. Let's wait for the builds. |
Issue: #3780
Description: #3780 (comment)