StellateHQ / fuse

Fuse: The fastest way to build and query great APIs with TypeScript

Home Page:https://fusedata.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RFC: Turbopack support

mxstbr opened this issue · comments

Summary

I tried next dev --turbo after running create-fuse-app and everything worked great—except the filesystem-based types/ folder isn't being picked up (as seen here because my types/Story.ts file isn't being picked up):

CleanShot 2024-01-14 at 11 16 06@2x

If I remove --turbo it works great:

CleanShot 2024-01-14 at 11 41 19@2x

Everything else seems to work!

This is caused by turbopack being unable to resolve same-package imports, i.e. when we import fuse from fuse/client then it will assume that fuse does not exist or can't be resolved as it's not present in the package.json/node_modules of the sub-folder we are in. Instead what vite/webpack seem to do is either resolve it form the root or recognise that we are already on fuse.

The error is basically a side-effect from not being able to resolve the fuse import and hence having no schema available to the server.