Skip to content

Commit

Permalink
docs(metro-config): add Expo example (#3274)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored Aug 12, 2024
1 parent 98bf1c0 commit 9c653cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .changeset/curvy-rockets-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
14 changes: 14 additions & 0 deletions packages/metro-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ module.exports = makeMetroConfig({
`makeMetroConfig` takes a Metro config as parameter. The config is augmented
with additional fields to make sure it works smoothly in a monorepo.

### Expo

`@rnx-kit/metro-config` can be used with Expo. Pass its default config to
`makeMetroConfig` like below:

```js
// metro.config.js
const { getDefaultConfig } = require("@expo/metro-config");
const { makeMetroConfig } = require("@rnx-kit/metro-config");

const config = getDefaultConfig(__dirname);
module.exports = makeMetroConfig(config);
```

## Known Limitations

While Metro is the de-facto standard, it lacks a few features that would make it
Expand Down

0 comments on commit 9c653cc

Please sign in to comment.