style: format and rename variables (#2469)

# Summary

Formatting and rename variable committed in #2415
This commit is contained in:
Jakub Grzywacz
2024-09-30 14:25:04 +02:00
committed by GitHub
parent cc961774e7
commit cd47aece7e
3 changed files with 28 additions and 19 deletions
+19 -15
View File
@@ -145,12 +145,15 @@ export default () => {
);
};
```
# Web configuration
## Metro bundler
No additional steps are required when using Metro bundler.
## Webpack
If you are using the Webpack bundler, the following steps are needed:
- Install `@react-native/assets-registry/registry` as a project dependency.
@@ -158,25 +161,26 @@ If you are using the Webpack bundler, the following steps are needed:
- Configure the Webpack `module -> rules` section and include an important rule for `node_modules/@react-native/assets-registry/registry`.
webpack.config.js
```ts
const babelLoaderConfiguration = {
include: [
path.resolve(
appDirectory,
// Important!
'node_modules/@react-native/assets-registry/registry',
),
],
...
```ts
const babelLoaderConfiguration = {
include: [
path.resolve(
appDirectory,
// Important!
'node_modules/@react-native/assets-registry/registry',
),
],
...
};
module.exports = {
...config,
module: {
rules: [babelLoaderConfiguration],
},
...config,
module: {
rules: [babelLoaderConfiguration],
},
};
```
```
For more details on the complete Webpack configuration, you can refer to this [documentation](https://necolas.github.io/react-native-web/docs/multi-platform/#compiling-and-bundling) on how to set up a `webpack.config` file for React Native Web.