webpack-cli icon indicating copy to clipboard operation
webpack-cli copied to clipboard

refactor: core

Open alexander-akait opened this issue 4 years ago • 3 comments

What kind of change does this PR introduce?

refactoring, resolve TODO

Did you add tests for your changes?

Will be added after fix entry bug in webpack

If relevant, did you update the documentation?

Yes, for webpack@5, you need to use --entry-reset or --target-reset before passing new entries or targets, i.e.

webpack.config.js

module.exports = { 
  entry: './src/my-entry.js'
};

To override entry:

  • when you use webpack@5 you need to run webpack --entry-reset --entry './src/other-entry.js'
  • when you use webpack@4 you need to run webpack --entry './src/other-entry.js'

Summary

Avoid extra actions for webpack@5

Does this PR introduce a breaking change?

No

Other information

No

alexander-akait avatar Jan 18 '21 15:01 alexander-akait

Codecov Report

Merging #2363 (8a4ab87) into master (9693f7d) will decrease coverage by 1.85%. The diff coverage is 35.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2363      +/-   ##
==========================================
- Coverage   70.21%   68.36%   -1.86%     
==========================================
  Files          47       47              
  Lines        2122     2124       +2     
  Branches      547      546       -1     
==========================================
- Hits         1490     1452      -38     
- Misses        632      672      +40     
Impacted Files Coverage Δ
packages/webpack-cli/lib/webpack-cli.js 86.02% <35.29%> (-5.00%) :arrow_down:
packages/generators/src/utils/prop-types.ts 80.00% <0.00%> (-20.00%) :arrow_down:
packages/configtest/src/index.ts 93.10% <0.00%> (-3.45%) :arrow_down:
packages/webpack-cli/lib/utils/cli-flags.js 94.44% <0.00%> (-2.78%) :arrow_down:

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 9693f7d...8a4ab87. Read the comment docs.

codecov[bot] avatar Jan 18 '21 16:01 codecov[bot]

Let's put this in the next release

alexander-akait avatar Jan 19 '21 11:01 alexander-akait

This might need a rebase

evenstensberg avatar Jun 24 '21 15:06 evenstensberg

@evenstensberg I think we can close this

@snitin315 Am I right and we already move most of these changed into the next branch

alexander-akait avatar Oct 07 '22 19:10 alexander-akait

@alexander-akait yes. We can close this.

snitin315 avatar Oct 08 '22 00:10 snitin315