Set base path
This commit is contained in:
parent
a13d8c9c5d
commit
4ff46b5103
3 changed files with 5 additions and 5 deletions
|
@ -9,9 +9,9 @@ const App = () => (
|
||||||
<div className={styles.App}>
|
<div className={styles.App}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route index element={<Home />} />
|
<Route index element={<Home />} />
|
||||||
<Route path="/movie/:movieId" element={<Movie />} />
|
<Route path="movie/:movieId" element={<Movie />} />
|
||||||
<Route path="/actor/:actorId" element={<Actor />} />
|
<Route path="actor/:actorId" element={<Actor />} />
|
||||||
<Route path="/ratings" element={<Ratings />} />
|
<Route path="ratings" element={<Ratings />} />
|
||||||
<Route path="*" element={<h1>404 - Not Found</h1>} />
|
<Route path="*" element={<h1>404 - Not Found</h1>} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { BrowserRouter } from "react-router-dom"
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<BrowserRouter>
|
<BrowserRouter basename={import.meta.env.BASE_URL}>
|
||||||
<App />
|
<App />
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import path from "path"
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
base: '/movie-react-app/',
|
base: "/movie-react-app/",
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
styles: path.resolve(__dirname, "/src/styles"),
|
styles: path.resolve(__dirname, "/src/styles"),
|
||||||
|
|
Reference in a new issue