Skip to content

refactor: simplify config loading by skipping fs.existsSync check #5305

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

Merged
merged 1 commit into from
Mar 24, 2020

Conversation

haoqunjiang
Copy link
Member

Use error code thrown by require directly.
This also simplifies module mocking in unit tests.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

Use error code thrown by `require` directly.
This also simplifies module mocking in unit test.
@haoqunjiang haoqunjiang merged commit f1bdf73 into vuejs:dev Mar 24, 2020
@haoqunjiang haoqunjiang deleted the fix-config-loading branch March 24, 2020 07:24
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this pull request May 19, 2020
reverts vuejs#5305
this makes the tests a little more tedious, need to find a better way
to test these functionalities

fixes vuejs#5442
haoqunjiang added a commit that referenced this pull request May 19, 2020
…5500)

reverts #5305
this makes the tests a little more tedious, need to find a better way
to test these functionalities

fixes #5442
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.

1 participant