Skip to content

Commit

Permalink
ci: use basename agenda
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlivino committed Jul 24, 2024
1 parent 77742cb commit 012da8b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AppRoutes } from "./routes";
function App() {
return (
<>
<BrowserRouter>
<BrowserRouter basename="/agenda">
<AppRoutes />
</BrowserRouter>
</>
Expand Down
5 changes: 2 additions & 3 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { HomePage } from "@/pages/HomePage";
import { LivePage } from "@/pages/LivePage";
import { MyAgenda } from "@/pages/MyAgenda";
Expand All @@ -8,8 +7,8 @@ export const AppRoutes = () => {
return (
<Routes>
<Route path="/" element={<HomePage />} />
<Route path="/agenda" element={<MyAgenda/>} />
<Route path="/lives" element={<LivePage />} />
<Route path="/minha-lista" element={<MyAgenda />} />
<Route path="/live" element={<LivePage />} />
<Route path="*" element={<h1>404</h1>} />
</Routes>
);
Expand Down
35 changes: 22 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import tsconfigPaths from 'vite-tsconfig-paths'
import path from 'path'
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import tsconfigPaths from "vite-tsconfig-paths";
import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tsconfigPaths()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
"@": path.resolve(__dirname, "src"),
},
},
test:{
build: {
rollupOptions: {
output: {
assetFileNames: "agenda/assets/[name].[hash][extname]",
chunkFileNames: "agenda/[name].[hash].js",
entryFileNames: "agenda/[name].[hash].js",
},
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./vitest.setup.ts'],
environment: "jsdom",
setupFiles: ["./vitest.setup.ts"],
include: ["src/**/*.test.{ts,js,tsx,jsx}"],
typecheck: {
enabled: false
}
}
})
enabled: false,
},
},
});

0 comments on commit 012da8b

Please sign in to comment.