{
+ if (route.path) {
+ navigate(route.path);
+ }
+ }}
+ className={`p-2 cursor-pointer ${
+ isActive ? "bg-blue-100 text-blue-600" : "bg-transparent text-black"
+ } transition-all duration-300`}
+ >
+ {route.path}
+
+ );
+ };
+
+ return (
+
+
+
+ {!isCollapsed && (
+ <>
+
{routes.map(renderMenuItem)}
+ >
+ )}
+
+ );
+}
+
+export default Sidebar;
+```
+
+## 2. combine the self config and automatically generated config together
+
+since the dirs of the `vite-plugin-pages` plugin is `src/views` (we config it in the step 2), so we can combine the self config and automatically generated config together.
+
+we need to create a dir which is not in the `src/views` dir(such as `src/pages`)
+
+``` tsx
+import routes from "~react-pages";
+import HomePage from 'src/pages/home/index.tsx';
+
+const pathsRouterConfig = routes
+const pathsManualConfig = [
+ {
+ path: '/home',
+ component: