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

Enable devMode with react-native init-windows old/* templates #13362

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

jonthysell
Copy link
Contributor

@jonthysell jonthysell commented Jun 18, 2024

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

  • Bug fix (non-breaking change which fixes an issue)

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-windows and the old/* templates

Microsoft Reviewers: Open in CodeFlow

@jonthysell jonthysell added Area: CLI Developer First Experience Issues that are going to be hit by a new developer as they first try out RNW Only Affects Internal Development Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper labels Jun 18, 2024
@jonthysell jonthysell requested review from a team as code owners June 18, 2024 17:19
@jonthysell jonthysell merged commit 813ba19 into microsoft:main Jun 18, 2024
57 checks passed
@jonthysell jonthysell deleted the devmodefix branch June 18, 2024 19:18
jonthysell added a commit to jonthysell/react-native-windows that referenced this pull request Aug 26, 2024
This PR backports microsoft#13362 to 0.74.

## 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
- Bug fix (non-breaking change which fixes an issue)

### 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

[0.74] Enabled detecting devMode with `react-native init-window`s and the old/* templates
jonthysell added a commit that referenced this pull request Aug 26, 2024
…13614)

This PR backports #13362 to 0.74.

## 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
- Bug fix (non-breaking change which fixes an issue)

### 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

[0.74] Enabled detecting devMode with `react-native init-window`s and the old/* templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CLI Developer First Experience Issues that are going to be hit by a new developer as they first try out RNW Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper Only Affects Internal Development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants