-
Notifications
You must be signed in to change notification settings - Fork 49
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
1197 npm build warnings in ci #1203
base: 2.3.0
Are you sure you want to change the base?
Conversation
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.
Very nice thanks for looking into it. However, I don't want the profile hints in watch
mode. But I want the export 'default'
warning. I thought about adding a warningsConfig
in webpack.config.js, but not if args.watch
is set. Or we add a build:testing
with a testingConfig
. What do you think?
yeah, also thought about adding another config. By adding a |
Yes, and |
9bc5100
to
48c2de7
Compare
package.json
Outdated
@@ -2,6 +2,7 @@ | |||
"name": "rdmo", | |||
"scripts": { | |||
"build:prod": "webpack --config webpack.config.js --mode production", |
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.
I would suggest that build:prod
fails on warnings and testing
does not, but contains the performance hints.
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.
Ive added an object ignorePerformanceWarnings
that build:prod
gets so that it can fail on other warnings
package.json
Outdated
@@ -2,6 +2,7 @@ | |||
"name": "rdmo", | |||
"scripts": { | |||
"build:prod": "webpack --config webpack.config.js --mode production", | |||
"build:testing": "webpack --config webpack.config.js --mode production --env testing --fail-on-warnings", |
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.
Why not just --mode testing and add 'process.env.NODE_ENV': JSON.stringify('testing')
?
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.
alright, I did not check.
webpack.config.js
Outdated
} else { | ||
return merge(config, baseConfig, productionConfig) | ||
throw new Error( |
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.
To much complexity production
can be the fallback and should be very strict, but still needs to allow for larger files.
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.
yes, refactored it into a switch
case
, I don't see the need for a fallback when it should not be receiving any other mode..
Signed-off-by: David Wallace <[email protected]>
Signed-off-by: David Wallace <[email protected]>
48c2de7
to
dff1508
Compare
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.
Maybe we should name it different from testing
if the only difference is that the performance warnings are suppressed. build:warn
maybe? It could also fail on warnings i guess. We will probaly not use it much. But you can also merge right away.
Description
Related issue: #1197
Motivation and Context
How has this been tested?
Screenshots (if appropriate)