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
Hi all,
I noticed in "The road to Fresh 2.0" (#2363), there was a hypothetical app.addIsland(...) method proposed briefly which I found interesting.
Currently it seems you can manually declare islands with the Vite config using the islandSpecifiers array, but it doesn't look like there's anywhere to declare a glob of "island" directories, which might be useful for more advanced use cases e.g. adopting "organised-by-features-not-concern" directory structure.
E.g. let's say I have:
/features
/users
/components <- fullstack
/handlers <- server
/islands <- client
/pages <- fullstack
/services <- server
(let's assume I'm not using file based routing at this stage and I'm wiring up routes manually)
It'd be cool to be able to have any components in /features/users/islands work like any normal island.
Maybe this conceptually clashes too much with the framework though; I've just found this sort of structure nice in a FastAPI (Python) project and now I'm trying to imagine my ideal counterpart in the JavaScript world, where we have the benefit of using the same language on the fronted and backend, which is especially convenient for SSR purposes...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I noticed in "The road to Fresh 2.0" (#2363), there was a hypothetical
app.addIsland(...)method proposed briefly which I found interesting.Currently it seems you can manually declare islands with the Vite config using the
islandSpecifiersarray, but it doesn't look like there's anywhere to declare a glob of "island" directories, which might be useful for more advanced use cases e.g. adopting "organised-by-features-not-concern" directory structure.E.g. let's say I have:
/features /users /components <- fullstack /handlers <- server /islands <- client /pages <- fullstack /services <- server(let's assume I'm not using file based routing at this stage and I'm wiring up routes manually)
It'd be cool to be able to have any components in
/features/users/islandswork like any normal island.Maybe this conceptually clashes too much with the framework though; I've just found this sort of structure nice in a FastAPI (Python) project and now I'm trying to imagine my ideal counterpart in the JavaScript world, where we have the benefit of using the same language on the fronted and backend, which is especially convenient for SSR purposes...
Beta Was this translation helpful? Give feedback.
All reactions