Commit 379f6c0
fix(react): export dist CSS entrypoints for Metro compatibility (#6962)
* fix(react): export dist CSS entrypoints for Metro compatibility
Metro warns when resolving Amplify UI CSS from React Native web/DOM usage because it probes the built subpath `./dist/styles.css`, which was not listed in package `exports`. Add explicit `./dist/styles.css` export aliases for `@aws-amplify/ui-react` and `@aws-amplify/ui-react-liveness` so Metro no longer have to implicitly fallback to file-based resolution.
```
WARN Attempted to import the module "…/node_modules/styles.css" which is not listed
in the "exports" of "…/@aws-amplify/ui-react" under the requested subpath
"./dist/styles.css". Falling back to file-based resolution. Consider updating the
call site or asking the package maintainer(s) to expose this API.
WARN Attempted to import the module "…/node_modules/styles.css" which is not listed
in the "exports" of "…/@aws-amplify/ui-react-liveness" under the requested subpath
"./dist/styles.css". Falling back to file-based resolution. …
```
* chore: add changeset
---------
Co-authored-by: Philipp Andreas Paul <phandpau@amazon.de>1 parent d6b6813 commit 379f6c0
3 files changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | | - | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
0 commit comments