-
Notifications
You must be signed in to change notification settings - Fork 560
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
Show Webpack compilation warnings in CLI #2186
Conversation
environment: defaulted(record(string(), unknown()), { | ||
NODE_DEBUG: false, | ||
NODE_ENV: 'production', | ||
DEBUG: false, | ||
}), | ||
environment: defaulted(record(string(), unknown()), {}), |
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.
Previously, the defaults would be completely ignored if any value was used. I've changed it to merge the defaults with the custom values provided in the config.
*/ | ||
new EnvironmentPlugin(config.environment), | ||
new DefinePlugin(getEnvironmentVariables(config.environment)), |
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.
EnvironmentPlugin
was causing compiler warnings. Switching to DefinePlugin
seems to have resolved this issue.
const path = dirname(this.resourcePath); | ||
for (const name of Object.keys(imports)) { | ||
this.addDependency(name); | ||
this.addDependency(resolve(path, name)); |
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.
Dependencies must use absolute paths. This solves a warning when using the WASM loader.
b7a200d
to
c6e6a3e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2186 +/- ##
=======================================
Coverage 96.54% 96.55%
=======================================
Files 331 331
Lines 7466 7482 +16
Branches 1148 1152 +4
=======================================
+ Hits 7208 7224 +16
Misses 258 258 ☔ View full report in Codecov by Sentry. |
Compilation warnings were previously ignored, potentially hiding important warnings from Webpack. This updates the Webpack config to show these warnings, and does some other changes to make warnings more readable.
Closes #2145.