From 2f1c9835ff9440ff129be3f3f378e41b5a8a98e1 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 4 Oct 2024 12:52:36 +0100 Subject: [PATCH] 7 --- apps/frontend/Dockerfile | 3 +++ apps/frontend/next.config.mjs | 9 +++++++++ apps/frontend/tsconfig.json | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/frontend/Dockerfile b/apps/frontend/Dockerfile index 192bd71..0234d3e 100644 --- a/apps/frontend/Dockerfile +++ b/apps/frontend/Dockerfile @@ -36,6 +36,9 @@ RUN pnpm install --frozen-lockfile --quiet # Build the project COPY --from=builder /app/out/full/ . + +RUN ls -la + RUN pnpm turbo run build --filter=frontend... FROM base AS runner diff --git a/apps/frontend/next.config.mjs b/apps/frontend/next.config.mjs index 40410bf..ef0cfcc 100644 --- a/apps/frontend/next.config.mjs +++ b/apps/frontend/next.config.mjs @@ -1,9 +1,18 @@ import { withSentryConfig } from "@sentry/nextjs"; import { format } from "@formkit/tempo"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file +const __dirname = path.dirname(__filename); // get the name of the directory /** @type {import('next').NextConfig} */ const nextConfig = { output: "standalone", + webpack: (config) => { + config.resolve.alias['@'] = path.join(__dirname, 'src'); + return config; + }, images: { remotePatterns: [ { diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json index c3a9fee..44e4b42 100644 --- a/apps/frontend/tsconfig.json +++ b/apps/frontend/tsconfig.json @@ -22,7 +22,7 @@ "noUnusedLocals": false, "noUnusedParameters": false, "preserveWatchOutput": true, - "baseUrl": "../../apps/frontend", + "baseUrl": ".", "paths": { "@/*": ["./src/*.ts", "./src/*"] }