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
For the third time in a row, I have a client with a content management system owning the urls of the site, via page hierarchy, slugs, etc.
I have the same issue with remix that I had with next, routing and page have to be declared via folder and file structure at build time to benefit entrypoint optimisation.
I workaround with slugs, or generic 'root' pages in the route folder and create my template in another folder.
Then at render time, I request the cms, determine the template type and render the url accordingly.
What I would like to have is the opportunity to have the exact same compilation logic and optimisation for my templates that I have for routes, but exclude them from automatic routing.
My proposal would be:
create a template folder
all files in this folder are considered entries at build time in the asset manifest, and they have their own js script entry management, same signature as current page (loader, meta, etc.)
server side : when loading a page in root.tsx or routes/$.tsx , have an option to delegate page rendering to a template file instead of letting the router search for a known file matching the url requested
client side : links can either point to a known page in the routes, a known template (can prefetch js/css assets) or an unknow template, so when rendering links it would be good if we could add this notion of 'known template' for optimisation
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,
For the third time in a row, I have a client with a content management system owning the urls of the site, via page hierarchy, slugs, etc.
I have the same issue with remix that I had with next, routing and page have to be declared via folder and file structure at build time to benefit entrypoint optimisation.
I workaround with slugs, or generic 'root' pages in the route folder and create my template in another folder.
Then at render time, I request the cms, determine the template type and render the url accordingly.
What I would like to have is the opportunity to have the exact same compilation logic and optimisation for my templates that I have for routes, but exclude them from automatic routing.
My proposal would be:
template
folderBeta Was this translation helpful? Give feedback.
All reactions