-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
feat: add additional scripts to init template #2550
Conversation
@@ -1,6 +1,9 @@ | |||
module.exports = (isUsingDevServer) => { | |||
const scripts = { | |||
build: 'webpack --mode=production', | |||
'build:dev': 'webpack', | |||
'build:prod': 'webpack --mode=production', | |||
watch: 'webpack --watch', |
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.
@webpack/cli-team What do you think better to use webpack --watch
or webpack watch
(i.e. flag vs command)
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'd prefer it as a flag since it doesn't have any options AFAIK
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'm ok with --watch
790a66b
to
9047648
Compare
Codecov Report
@@ Coverage Diff @@
## master #2550 +/- ##
=======================================
Coverage 90.74% 90.74%
=======================================
Files 29 29
Lines 1459 1459
Branches 416 416
=======================================
Hits 1324 1324
Misses 135 135
Continue to review full report at Codecov.
|
@@ -1,6 +1,9 @@ | |||
module.exports = (isUsingDevServer) => { | |||
const scripts = { | |||
build: 'webpack --mode=production', | |||
'build:dev': 'webpack', |
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.
'build:dev': 'webpack', | |
'build:dev': 'webpack --mode=development', |
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.
The generated webpack config has the mode set to development.
mode: 'development', |
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 think it will be much clear if we mention --mode=development
though both are the same.
Thoughts /cc @webpack/cli-team
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 flag is more explicit than implied via config
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.
/cc @webpack/cli-team
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.
LGTM
Thanks |
What kind of change does this PR introduce?
Enhancement
Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
N/A
Summary
#2536 (comment)
Does this PR introduce a breaking change?
Nope
Other information
N/A