Skip to content

fix(cli): Run config function before looking for --config-name#8363

Merged
chenjiahan merged 1 commit intoweb-infra-dev:mainfrom
andersk:config-name-function
Nov 7, 2024
Merged

fix(cli): Run config function before looking for --config-name#8363
chenjiahan merged 1 commit intoweb-infra-dev:mainfrom
andersk:config-name-function

Conversation

@andersk
Copy link
Copy Markdown
Contributor

@andersk andersk commented Nov 6, 2024

Summary

When the config is a function, we need to match --config-name on its return value, not the function itself.

Checklist

  • Tests updated (or not required).
    • tests/webpack-cli-test/build/config-name/config-name.test.js seems to already have tests for this ("should work with config as a function", "should work with multiple values for --config-name when the config is a function"), but it seems we never run those tests.
  • Documentation updated (or not required).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 6, 2024

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit d7dfd30
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/672bef0bba65ef00089bb4b5

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Nov 6, 2024
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@chenjiahan chenjiahan merged commit 8cf67de into web-infra-dev:main Nov 7, 2024
@chenjiahan
Copy link
Copy Markdown
Member

@LingyuCoder can you check why the tests/webpack-cli-test/build/config-name/config-name.test.js never runs?

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

Labels

release: bug fix release: bug related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants