Skip to content

Commit 8aa7123

Browse files
authored
[docs] Remove static config note in Metro guide, adjust formatting (#3782)
1 parent 36e4b99 commit 8aa7123

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/metro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Configuration options for Metro can be customized in your project's `metro.confi
1616
Please see [**Configuring Metro**](https://facebook.github.io/metro/docs/configuration) on the Metro website for documentation on all available config options.
1717
:::
1818

19-
In React Native, your Metro config should extend either [@react-native/metro-config](https://www.npmjs.com/package/@react-native/metro-config) or [@expo/metro-config](https://www.npmjs.com/package/@expo/metro-config). These packages contain essential defaults necessary to build and run React Native apps.
19+
In React Native, your Metro config should extend either [`@react-native/metro-config`](https://www.npmjs.com/package/@react-native/metro-config) or [`@expo/metro-config`](https://www.npmjs.com/package/@expo/metro-config). These packages contain essential defaults necessary to build and run React Native apps.
2020

2121
Below is the default `metro.config.js` file in a React Native template project:
2222

@@ -35,14 +35,14 @@ const config = {};
3535
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
3636
```
3737

38-
Metro options you wish to customize can be done so within the `config` object. We strongly recommend defining all config values statically within this file.
38+
Metro options you wish to customize can be done so within the `config` object.
3939

4040
### Advanced: Using a config function
4141

4242
Exporting a config function is an opt-in to managing the final config yourself — **Metro will not apply any internal defaults**. This pattern can be useful when needing to read the base default config object from Metro or to set options dynamically.
4343

4444
:::info
45-
**From @react-native/metro-config `0.72.1`**, it is no longer necessary to use a config function to access the complete default config. See the **Tip** section below.
45+
**From `@react-native/metro-config` 0.72.1**, it is no longer necessary to use a config function to access the complete default config. See the **Tip** section below.
4646
:::
4747

4848
<!-- prettier-ignore -->
@@ -66,7 +66,7 @@ module.exports = function (baseConfig) {
6666
```
6767

6868
:::tip
69-
Using a config function is for advanced use cases. A simpler method than the above, e.g. for customising `sourceExts`, would be to read these defaults from **@react-native/metro-config**.
69+
Using a config function is for advanced use cases. A simpler method than the above, e.g. for customising `sourceExts`, would be to read these defaults from `@react-native/metro-config`.
7070

7171
**Alternative**
7272

website/versioned_docs/version-0.72/metro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Configuration options for Metro can be customized in your project's `metro.confi
1616
Please see [**Configuring Metro**](https://facebook.github.io/metro/docs/configuration) on the Metro website for documentation on all available config options.
1717
:::
1818

19-
In React Native, your Metro config should extend either [@react-native/metro-config](https://www.npmjs.com/package/@react-native/metro-config) or [@expo/metro-config](https://www.npmjs.com/package/@expo/metro-config). These packages contain essential defaults necessary to build and run React Native apps.
19+
In React Native, your Metro config should extend either [`@react-native/metro-config`](https://www.npmjs.com/package/@react-native/metro-config) or [`@expo/metro-config`](https://www.npmjs.com/package/@expo/metro-config). These packages contain essential defaults necessary to build and run React Native apps.
2020

2121
Below is the default `metro.config.js` file in a React Native template project:
2222

@@ -35,14 +35,14 @@ const config = {};
3535
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
3636
```
3737

38-
Metro options you wish to customize can be done so within the `config` object. We strongly recommend defining all config values statically within this file.
38+
Metro options you wish to customize can be done so within the `config` object.
3939

4040
### Advanced: Using a config function
4141

4242
Exporting a config function is an opt-in to managing the final config yourself — **Metro will not apply any internal defaults**. This pattern can be useful when needing to read the base default config object from Metro or to set options dynamically.
4343

4444
:::info
45-
**From @react-native/metro-config `0.72.1`**, it is no longer necessary to use a config function to access the complete default config. See the **Tip** section below.
45+
**From `@react-native/metro-config` 0.72.1**, it is no longer necessary to use a config function to access the complete default config. See the **Tip** section below.
4646
:::
4747

4848
<!-- prettier-ignore -->
@@ -66,7 +66,7 @@ module.exports = function (baseConfig) {
6666
```
6767

6868
:::tip
69-
Using a config function is for advanced use cases. A simpler method than the above, e.g. for customising `sourceExts`, would be to read these defaults from **@react-native/metro-config**.
69+
Using a config function is for advanced use cases. A simpler method than the above, e.g. for customising `sourceExts`, would be to read these defaults from `@react-native/metro-config`.
7070

7171
**Alternative**
7272

0 commit comments

Comments
 (0)