is there a way to disable default lazy loading for routes in solidstart?

it seems routes are download when a link to them is clicked and then cached. is there a way to just download all routes on any route like solid spa?
11 Replies
Alex Lohr
Alex Lohr4d ago
When I last checked, all routes were preloaded via link tag and only evaluated once the location was loaded.
Hussein
Hussein4d ago
go to the network tab and click on a link you'll see the routename.js downloaded i want it to be download even before clicking the link
Hussein
Hussein4d ago
it still downloads routename.js i want it be pre-downloaded like the vite solid template get it? basically FileRoutes is lazy loading all routes which i don't like
Alex Lohr
Alex Lohr4d ago
Interesting preference.
Hussein
Hussein4d ago
yeah...
Alex Lohr
Alex Lohr4d ago
let me check something You could attempt to write your own middleWare that uses require to load the routes synchronously, but that's a rather ugly solution.
Hussein
Hussein4d ago
i can delete <FileRoutes /> and define my own <Route />s it is an ugly solution but it works with ssr and all
Alex Lohr
Alex Lohr4d ago
yes, that's currently the only viable solution, I'm afraid. Maybe you can convince Nikhil or Ryan to provide a sync option to FileRoutes at some point.
Hussein
Hussein4d ago
that'd be most-optimal
Hussein
Hussein4d ago
GitHub
[Feature?]: Add an option to disable lazy loading in `` · Issue #15...
Duplicates I have searched the existing issues Latest version I have tested the latest version Summary 💡 currently, FileRoutes lazy-loades all routes by default which is sometimes undesired. Adding...
Want results from more Discord servers?
Add your server
More Posts
Granular update of store array doesn't trigger effects depending on the whole arrayI am really puzzled with proper setup for store array management. I am creating the array in the stNeed to add a Babel plugin to solid startHi Solid Start Team, I need to add the following babel plugin to a solid start project: https://babEventSource's response has a MIME type ("text/html") that is not "text/event-stream".I'm trying to make SSE, but when i load the website I'm getting that error in the console of the weWith CSR, I see components inside Suspense rendering without waiting for CreateAsync's dataThis happens on client side routing. ```const routeData: Accessor<ProfileRouteData | undefined> = Incorrect response MIME type. Expected 'application/wasm'.The browser console reports an error: wasm streaming compile failed: TypeError: Failed to execute 'cI have a use case for createResource vs normal async await api call.``const sendOtp = async({reqId}) => { return await sendApiRequest({ endpoint: "generateotp", Is My Understanding Of RouteSectionProps Correct?I’ve been trying to implement the `cache`, `load`, and `createAsync` pattern on all of my pages thatPage content not updating on route changeI have the following page: ```ts import { createAsync, useParams, type RouteDefinition } from '@soliHow to get snapshot value from storeHi, I currently have the following problem. I try to create a file and need values from a Store for AggregateError on accessing my db with drizzle-orm and supabase`/src/api/db.ts` ```ts import { drizzle } from 'drizzle-orm/postgres-js'; import postgres from 'post