Enable devMode with react-native init-windows old/* templates #13362
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The
init-windows
CLI command can be used to create apps with the old arch templates, but "devMode" (i.e. using your local, linked RNW repo instead of the package from NPM) didn't work.This PR fixes that functionality so
init-windows
can become the new method.Type of Change
Why
We want
init-windows
to be the default method for creating new RNW projects, but it still needs to support the old templates for now, and this was the last "missing" feature.What
Switched the old templates to using the same
metro.config.js
file that the new templates use (with devMode template variable) and also piping through the correct value for that variable.Screenshots
N/A
Testing
Verified I could create a new (old) app locally with linked RNW and it recognized and implemented devMode correctly, so that the app could launch.
Changelog
Should this change be included in the release notes: yes
Enabled detecting devMode with
react-native init-window
s and the old/* templatesMicrosoft Reviewers: Open in CodeFlow