Set base path

This commit is contained in:
“Henry-Hiles” 2022-11-15 10:56:40 -05:00
parent a13d8c9c5d
commit 4ff46b5103
3 changed files with 5 additions and 5 deletions

View file

@ -9,9 +9,9 @@ const App = () => (
<div className={styles.App}>
<Routes>
<Route index element={<Home />} />
<Route path="/movie/:movieId" element={<Movie />} />
<Route path="/actor/:actorId" element={<Actor />} />
<Route path="/ratings" element={<Ratings />} />
<Route path="movie/:movieId" element={<Movie />} />
<Route path="actor/:actorId" element={<Actor />} />
<Route path="ratings" element={<Ratings />} />
<Route path="*" element={<h1>404 - Not Found</h1>} />
</Routes>
</div>

View file

@ -6,7 +6,7 @@ import { BrowserRouter } from "react-router-dom"
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<BrowserRouter>
<BrowserRouter basename={import.meta.env.BASE_URL}>
<App />
</BrowserRouter>
</React.StrictMode>

View file

@ -4,7 +4,7 @@ import path from "path"
export default defineConfig({
plugins: [react()],
base: '/movie-react-app/',
base: "/movie-react-app/",
resolve: {
alias: {
styles: path.resolve(__dirname, "/src/styles"),