webpack-cli
webpack-cli copied to clipboard
refactor: core
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 runwebpack --entry-reset --entry './src/other-entry.js'
- when you use
webpack@4
you need to runwebpack --entry './src/other-entry.js'
Summary
Avoid extra actions for webpack@5
Does this PR introduce a breaking change?
No
Other information
No
Codecov Report
Merging #2363 (8a4ab87) into master (9693f7d) will decrease coverage by
1.85%
. The diff coverage is35.29%
.
@@ 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.
Let's put this in the next release
This might need a rebase
@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 yes. We can close this.