Skip to content

Conversation

jamesgeorge007
Copy link
Member

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

@jamesgeorge007 jamesgeorge007 requested a review from a team as a code owner March 24, 2021 16:37
@@ -1,6 +1,9 @@
module.exports = (isUsingDevServer) => {
const scripts = {
build: 'webpack --mode=production',
'build:dev': 'webpack',
'build:prod': 'webpack --mode=production',
watch: 'webpack --watch',
Copy link
Member

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)

Copy link
Member

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

Copy link
Member

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

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #2550 (84d0abe) into master (6fb1215) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2550   +/-   ##
=======================================
  Coverage   90.74%   90.74%           
=======================================
  Files          29       29           
  Lines        1459     1459           
  Branches      416      416           
=======================================
  Hits         1324     1324           
  Misses        135      135           
Impacted Files Coverage Δ
...s/generators/init-template/default/package.json.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fb1215...84d0abe. Read the comment docs.

@@ -1,6 +1,9 @@
module.exports = (isUsingDevServer) => {
const scripts = {
build: 'webpack --mode=production',
'build:dev': 'webpack',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'build:dev': 'webpack',
'build:dev': 'webpack --mode=development',

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member

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

Copy link
Member

@alexander-akait alexander-akait left a 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

@snitin315 snitin315 requested a review from anshumanv March 25, 2021 13:59
Copy link
Member

@anshumanv anshumanv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anshumanv anshumanv merged commit 665d993 into master Mar 25, 2021
@anshumanv anshumanv deleted the feat/init branch March 25, 2021 15:26
@anshumanv
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants