You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -297,7 +297,7 @@ This default is directly misaligned with react-native-web via Webpack ([docs](h
297
297
Combined, this is the only breaking change we foresee in Metro that will immediately impact app developers, and which we are not deferring via strict mode opt-in. It will align behaviour for existing users of react-native-web via Webpack.
298
298
299
299
| Condition name | Description | Node.js | Webpack | Metro (proposed) |
300
-
| - | - | - | - | - | - |
300
+
| - | - | - | - | - |
301
301
|`"browser"`| Any web browser environment | - | Matched when `platform === 'web'`| Matched when `platform === 'web'`|
302
302
|`"react-native"`[New]| Any React Native runtime environment (non-browser) | - | Matched when `platform !== 'web'`| Matched when `platform !== 'web'`|
303
303
| All other || (unimplemented) | Various supported, e.g. `"deno"`, `"worker"`, `"electron"`| (unimplemented) |
@@ -341,7 +341,7 @@ Therefore, Metro will default to lenient and backwards compatible behaviour, as
341
341
342
342
The new flag will be exposed as a `reactNative.metroExportsMode` field within `package.json`.
343
343
344
-
```json
344
+
```js
345
345
{
346
346
"name":"my-package",
347
347
"exports": {...},
@@ -354,7 +354,7 @@ The new flag will be exposed as a `reactNative.metroExportsMode` field within `p
354
354
355
355
Note: `"reactNative"` (in camel case) will be a distinct field from `"react-native"` (in dash case, used as a `"main"` module alias that we are starting to deprecate with `"exports"`). We are [separately considering a `"newArchSupport"` option](https://github.com/microsoft/rnx-kit/issues/1863#issuecomment-1246580474) within this new top-level key, which will encapsulate options available to React Native packages.
356
356
357
-
### Behaviour under `"nonstrict"` mode (default)
357
+
####Behaviour under `"nonstrict"` mode (default)
358
358
359
359
- Any subpaths are importable (package encapsulation is not enforced).
360
360
- When ambiguous, subpaths outside `"exports"` are preferred.
0 commit comments