Skip to content
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

fix: handle undefined configuration export #2930

Merged
merged 9 commits into from Sep 7, 2021

Conversation

rishabh3112
Copy link
Member

What kind of change does this PR introduce?
fix and test

Did you add tests for your changes?
Yup, did in TDD fashion.

If relevant, did you update the documentation?
Not required.

Summary
Treat undefined configuration as a case for zero-config

Does this PR introduce a breaking change?
Nope.

Other information
/cc @alexander-akait

when we have webpack.config.js without module.exports or export we don't work, but no exports means zero configuration and should work

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 4, 2021

CLA Signed

The committers are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Sep 4, 2021

Codecov Report

Merging #2930 (424e0b7) into master (6fc4f79) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2930   +/-   ##
=======================================
  Coverage   95.13%   95.13%           
=======================================
  Files          31       31           
  Lines        1684     1684           
  Branches      481      483    +2     
=======================================
  Hits         1602     1602           
  Misses         82       82           
Impacted Files Coverage Δ
packages/webpack-cli/lib/webpack-cli.js 96.52% <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 6fc4f79...424e0b7. Read the comment docs.

alexander-akait
alexander-akait previously approved these changes Sep 4, 2021
@rishabh3112
Copy link
Member Author

@webpack/cli-team need approvals.

Copy link
Member

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

Few comments.

test/build/config/no-code/no-code.test.js Outdated Show resolved Hide resolved
test/build/config/undefined/src/index.js Outdated Show resolved Hide resolved
test/build/config/undefined/undefined.test.js Outdated Show resolved Hide resolved
@alexander-akait alexander-akait merged commit 9b9040e into master Sep 7, 2021
@alexander-akait alexander-akait deleted the fix/empty-configuration branch September 7, 2021 11:44
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.

None yet

4 participants