Skip to content

Commit e2212e0

Browse files
authored
update installation docs to include metro config (#447)
1 parent c6db33b commit e2212e0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/audiodocs/docs/fundamentals/getting-started.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The goal of _Fundamentals_ is to guide you through the setup process of the Audi
1313

1414
It takes only a few steps to add Audio API to your project:
1515

16-
### Install the package
16+
### Step 1: Install the package
1717

1818
Install the `react-native-audio-api` package from npm:
1919

@@ -35,6 +35,23 @@ Install the `react-native-audio-api` package from npm:
3535
</TabItem>
3636
</Tabs>
3737

38+
### Step 2: Wrap metro config with Audio API wrapper
39+
40+
Wrap your existing Metro configuration in the `metro.config.js` file with the `wrapWithAudioAPIMetroConfig` function:
41+
42+
```javascript
43+
// metro.config.js
44+
const {
45+
wrapWithAudioAPIMetroConfig,
46+
} = require('react-native-audio-api/metro-config');
47+
48+
const config = {
49+
// Your existing Metro configuration options
50+
};
51+
52+
module.exports = wrapWithAudioAPIMetroConfig(config);
53+
```
54+
3855
### Usage with expo
3956

4057
`react-native-audio-api` contains native custom code and isn't part of the Expo Go application. In order to be available in expo managed builds, you have to use Expo development build. Simplest way on starting local expo dev builds, is to use:

0 commit comments

Comments
 (0)