fix: ensure `--build-output` destination exists
Summary:
Replicates https://github.com/react-native-community/cli/commit/48d4c29bba4e8b16cbc8307bd1b4c5349f3651d8, which landed inside cli-plugin-metro inside RNC CLI, but because of migration of code to community-cli-plugin it looks like apparently the fix wasn't replicated.
Changelog:
[GENERAL] [FIXED] - Ensure --build-output destination exists
Test Plan:
Specify a new directory that doesn't exists inside --build-output:
npx react-native bundle --build-output dist/new-dir/index.bundle
and this command shouldn't fail.
cc @tido64 just FYI
@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@huntie merged this pull request in facebook/react-native@396bdd87d8021902ad78b817314fdc5b6207c2ea.
This pull request was successfully merged by @szymonrybczak in 396bdd87d8021902ad78b817314fdc5b6207c2ea
When will my fix make it into a release? | How to file a pick request?