create-lego-one 2.0.17 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/host/package.json +1 -1
- package/template/host/src/App.tsx +12 -2
- package/template/host/src/bootstrap.tsx +2 -0
- package/template/host/src/routes/layout.tsx +10 -0
- package/template/package.json +6 -2
- package/template/packages/plugins/@lego/plugin-dashboard/package.json +1 -1
- package/template/packages/plugins/@lego/plugin-todo/package.json +1 -1
- package/template/host/src/routes/_.tsx +0 -6
- /package/template/host/src/routes/{index.tsx → page.tsx} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Routes, Route } from '@modern-js/runtime/router';
|
|
2
2
|
import './global.css';
|
|
3
|
+
import RootLayout from './routes/layout';
|
|
4
|
+
import HomePage from './routes/page';
|
|
5
|
+
import LoginPage from './routes/login';
|
|
3
6
|
|
|
4
7
|
export default function App() {
|
|
5
|
-
return
|
|
8
|
+
return (
|
|
9
|
+
<Routes>
|
|
10
|
+
<Route path="/" element={<RootLayout />}>
|
|
11
|
+
<Route index element={<HomePage />} />
|
|
12
|
+
<Route path="login" element={<LoginPage />} />
|
|
13
|
+
</Route>
|
|
14
|
+
</Routes>
|
|
15
|
+
);
|
|
6
16
|
}
|
|
@@ -60,6 +60,8 @@ initializePlugins();
|
|
|
60
60
|
|
|
61
61
|
console.log('[Bootstrap] ✅ Starting app render...');
|
|
62
62
|
|
|
63
|
+
// When using custom bootstrap with Modern.js file-based routing,
|
|
64
|
+
// we may need BrowserRouter even though runtime.router: true is set
|
|
63
65
|
root.render(
|
|
64
66
|
<StrictMode>
|
|
65
67
|
<BrowserRouter>
|
package/template/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lego-one",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Microkernel SaaS OS with Modern.js + Garfish + PocketBase",
|
|
6
6
|
"type": "module",
|
|
@@ -40,5 +40,9 @@
|
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=18.0.0",
|
|
42
42
|
"pnpm": ">=8.0.0"
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
".gitignore",
|
|
46
|
+
"src"
|
|
47
|
+
]
|
|
44
48
|
}
|
|
File without changes
|