Skip to content

feat: add support for react-native.config.ts - #2343

Merged
thymikee merged 2 commits into
mainfrom
feat/add-support-for-react-native-config-ts
Apr 4, 2024
Merged

feat: add support for react-native.config.ts#2343
thymikee merged 2 commits into
mainfrom
feat/add-support-for-react-native-config-ts

Conversation

@szymonrybczak

Copy link
Copy Markdown
Collaborator

Summary:

Closes#2253

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Create react-native.config.ts with some config.
  3. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js config
  1. Changes applied inside react-native.config.ts should be visible inside command's output.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@szymonrybczak

Copy link
Copy Markdown
CollaboratorAuthor

I think we should export Config type through @react-native-community/cli so users could use it inside a config file:

import{Config}from'@react-native-community/cli';constconfig: Config={commands: [{name: 'hello ',func: ()=>{console.log('hello');},},],};exportdefaultconfig;

Right now it's exported through cli-types so users cannot import it directly from react-native.config.ts

@szymonrybczak
szymonrybczakforce-pushed the feat/add-support-for-react-native-config-ts branch from 3432ae2 to 493c8c7CompareMarch 25, 2024 09:46
@thymikee

Copy link
Copy Markdown
Member

Let's add an e2e test that verifies a TS file is read

@szymonrybczak
szymonrybczak marked this pull request as ready for review March 28, 2024 15:45
@szymonrybczak
szymonrybczakforce-pushed the feat/add-support-for-react-native-config-ts branch from adb5c53 to 8221b51CompareMarch 28, 2024 16:01
@szymonrybczak

Copy link
Copy Markdown
CollaboratorAuthor

Let's add an e2e test that verifies a TS file is read

Tests landed ✅ might giving review again?

@thymikee
thymikee merged commit 86ada98 into mainApr 4, 2024
@thymikee
thymikee deleted the feat/add-support-for-react-native-config-ts branch April 4, 2024 08:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for react-native.config.ts

2 participants

@szymonrybczak@thymikee