Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/react-router-dom.js?v=63986831' does not provide an export named 'Switch'
My components are not rendering. This is my second project and in first project I used CRA to create react app and now I used vite . I installed react router dom still it it thorws error saying . I am totally new to this .Thanks for your time.
import { Switch } from "react-router-dom";
import { Route } from "react-router-dom";
import Login from './login.jsx'
import Home from "./component/home/Home.jsx"
import './index.css'
const App = () => {
return (
<>
<Switch>
<Route path='/' component={Home} />
<Route path="/login" component={Login} />
</Switch>
</>
);
} export default App;