Skip to content

Commit

Permalink
Improvements (#94)
Browse files Browse the repository at this point in the history
* Removes unnecessary logging statement in main.tsx
* Adds sourcemaps to frontend build
* Upgrades node in docker build -> 20.13.1
* Upgrades pnpm in docker build -> 9.1.2
  • Loading branch information
amorey authored May 22, 2024
1 parent 40f2391 commit 1949f61
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ CMD []

# -----------------------------------------------------------

FROM node:20.12.2-alpine3.19 AS frontend-builder
FROM node:20.13.1-alpine3.19 AS frontend-builder

WORKDIR /frontend

# enable pnpm
RUN corepack enable
RUN corepack prepare pnpm@9.0.6 --activate
RUN corepack prepare pnpm@9.1.2 --activate

# set up git+ssh for private package download from github
RUN apk add git openssh-client
Expand Down
7 changes: 0 additions & 7 deletions frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ import { ThemeProvider } from '@/lib/theme';

import './index.css';

// handle runtimeConfig (inserted by server in production)
if ('runtimeConfig' in window) {
// @ts-expect-error 'window.runtimeConfig' is of type 'unknown'
import.meta.env.VITE_HELLO = window.runtimeConfig.basePath;
console.log(import.meta.env.VITE_HELLO);
}

const router = createBrowserRouter(createRoutesFromElements(routes), { basename: getBasename() });

ReactDOM.createRoot(document.getElementById('root')!).render(
Expand Down
1 change: 1 addition & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default defineConfig({
},
build: {
manifest: true,
sourcemap: true,
},
test: {
environment: 'jsdom',
Expand Down

0 comments on commit 1949f61

Please sign in to comment.