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
**Problem:**
Today we don't recognize when a default export is declared separately.
```ts
function App(){...}
export default App
```
this is not treated as a component when it's imported:
<video
src="https://github.com/user-attachments/assets/a52ce448-c324-44e9-bae1-9c64c3af21e5"></video>
**Fix:**
Use `isExportDefault` instead of a specific check for a function or a
class
**Manual Tests:**
I hereby swear that:
- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Play mode
Fixes#6439
**Problem:**
Today we don't recognize when a default export is declared separately.
```ts
function App(){...}
export default App
```
this is not treated as a component when it's imported:
<video
src="https://github.com/user-attachments/assets/a52ce448-c324-44e9-bae1-9c64c3af21e5"></video>
**Fix:**
Use `isExportDefault` instead of a specific check for a function or a
class
**Manual Tests:**
I hereby swear that:
- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Play mode
Fixes#6439
It seems that Utopia doesn't properly support
export default
for components, so if we usethen using
import {default as App} from
orimport App from
will result App being treated as arbitrary JS, as seen in this project https://utopia.pizza/p/098edac2-rogue-asteroid/Note that
doesn't work, but
does work.
The text was updated successfully, but these errors were encountered: