Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function ShelfPlaceholder() {
/* ---------- Routes ---------- */
export function App() {
return (
<BrowserRouter>
<BrowserRouter basename={import.meta.env.BASE_URL}>
<Routes>
<Route element={<AppShell />}>
<Route index element={<BrowsePage />} />
Expand Down
2 changes: 1 addition & 1 deletion client/src/apollo/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client';

// GraphQL server address. Override with VITE_GRAPHQL_URL in .env (e.g. on the VM)
const uri = import.meta.env.VITE_GRAPHQL_URL ?? 'http://localhost:3001/graphql';
const uri = import.meta.env.VITE_GRAPHQL_URL ?? '/project2/graphql';;

export const client = new ApolloClient({
link: new HttpLink({ uri }), // how requests reach the server
Expand Down
5 changes: 3 additions & 2 deletions client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import babel from '@rolldown/plugin-babel';
import { defineConfig } from 'vite';

// https://vite.dev/config/
export default defineConfig({
export default defineConfig(({ command }) => ({
base: command === 'build' ? '/project2/' : '/',
plugins: [react(), babel({ presets: [reactCompilerPreset()] })],
});
}));