[
{
"/apollo-server-n-client": {
"exact": false,
"icon": "export",
"key": "dashboard",
"tab": "Apollo Server",
"position": "MIDDLE",
"name": "Apollo Server",
"path": "/apollo-server-n-client",
"file": {}
}
},
{
"/apollo-server-n-client/counter": {
"key": "counter",
"name": "Counter",
"icon": "appstore-o",
"position": "MIDDLE",
"path": "/apollo-server-n-client/counter"
}
},
{
"/": {
"path": "/",
"key": "home",
"exact": true,
"name": "Home",
"position": "MIDDLE",
"file": {}
}
},
{
"/emotion": {
"tab": "Emotion Styling",
"key": "emotion",
"position": "MIDDLE",
"name": "Emotion Styling",
"path": "/emotion",
"file": {}
}
},
{
"/redux-first-history": {
"exact": false,
"icon": "export",
"position": "MIDDLE",
"name": "Redux First History",
"key": "/redux-first-history",
"path": "/redux-first-history",
"file": {}
}
},
{
"/redux-first-history/hello": {
"exact": true,
"icon": "export",
"name": "Hello",
"position": "MIDDLE",
"key": "/redux-first-history/hello",
"path": "/redux-first-history/hello",
"file": {}
}
},
{
"/redux-first-history/counter": {
"exact": true,
"icon": "export",
"name": "Counter",
"position": "MIDDLE",
"key": "/redux-first-history/counter",
"path": "/redux-first-history/counter",
"file": {}
}
}
]
1. Generate
<package>/lib/routes.jsonfile for each browser package. We added a rollup plugin which generates this by reading through allcompute.tsxfrom thelibdirectory.2. We need to also add
file:reference in the object pointing to the location of the component. (right now it is not working).Changes are in this branch Feat/generate routes #361
3. After this sorted, next we need to create a plugin in vite to gather all the
<packages>/lib/routes.jsonand generate react-router v6 compatible configuration file which can be used in remix.generated
routes.json[ { "/apollo-server-n-client": { "exact": false, "icon": "export", "key": "dashboard", "tab": "Apollo Server", "position": "MIDDLE", "name": "Apollo Server", "path": "/apollo-server-n-client", "file": {} } }, { "/apollo-server-n-client/counter": { "key": "counter", "name": "Counter", "icon": "appstore-o", "position": "MIDDLE", "path": "/apollo-server-n-client/counter" } }, { "/": { "path": "/", "key": "home", "exact": true, "name": "Home", "position": "MIDDLE", "file": {} } }, { "/emotion": { "tab": "Emotion Styling", "key": "emotion", "position": "MIDDLE", "name": "Emotion Styling", "path": "/emotion", "file": {} } }, { "/redux-first-history": { "exact": false, "icon": "export", "position": "MIDDLE", "name": "Redux First History", "key": "/redux-first-history", "path": "/redux-first-history", "file": {} } }, { "/redux-first-history/hello": { "exact": true, "icon": "export", "name": "Hello", "position": "MIDDLE", "key": "/redux-first-history/hello", "path": "/redux-first-history/hello", "file": {} } }, { "/redux-first-history/counter": { "exact": true, "icon": "export", "name": "Counter", "position": "MIDDLE", "key": "/redux-first-history/counter", "path": "/redux-first-history/counter", "file": {} } } ]