diff --git a/.dockerignore b/.dockerignore index 680bb19..fc1f90f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -18,8 +18,8 @@ out .git .gitignore *.log -.env -.env.* +#.env +#.env.* !.env.example .vscode .idea diff --git a/apps/next/next.config.js b/apps/next/next.config.js index a73af29..ba388d3 100644 --- a/apps/next/next.config.js +++ b/apps/next/next.config.js @@ -1,7 +1,7 @@ import { withSentryConfig } from '@sentry/nextjs'; import { withPlausibleProxy } from 'next-plausible'; -import { env } from './src/env.js'; +import { env } from '@/env'; /** @type {import("next").NextConfig} */ const config = withPlausibleProxy({ diff --git a/apps/next/package.json b/apps/next/package.json index 77a674f..50cfbaf 100644 --- a/apps/next/package.json +++ b/apps/next/package.json @@ -4,7 +4,8 @@ "type": "module", "private": true, "scripts": { - "build": "bun with-env next build", + "build": "bun next build", + "build:env": "bun with-env next build", "clean": "git clean -xdf .cache .next .turbo node_modules", "dev": "bun with-env next dev --turbo", "dev:tunnel": "bun with-env next dev --turbo", diff --git a/apps/next/src/env.js b/apps/next/src/env.ts similarity index 94% rename from apps/next/src/env.js rename to apps/next/src/env.ts index 7672d11..a2735c6 100644 --- a/apps/next/src/env.js +++ b/apps/next/src/env.ts @@ -1,6 +1,5 @@ import { createEnv } from '@t3-oss/env-nextjs'; import { z } from 'zod/v4'; -import { process } from 'zod/v4/core'; export const env = createEnv({ shared: { @@ -36,7 +35,6 @@ export const env = createEnv({ experimental__runtimeEnv: { NODE_ENV: process.env.NODE_ENV, CI: process.env.CI, - SENTRY_AUTH_TOKEN: process.env.SENTRY_AUTH_TOKEN, NEXT_PUBLIC_SITE_URL: process.env.NEXT_PUBLIC_SITE_URL, NEXT_PUBLIC_CONVEX_URL: process.env.NEXT_PUBLIC_CONVEX_URL, NEXT_PUBLIC_PLAUSIBLE_URL: process.env.NEXT_PUBLIC_PLAUSIBLE_URL, diff --git a/apps/next/src/instrumentation-client.ts b/apps/next/src/instrumentation-client.ts index 4abcdfd..63b3520 100644 --- a/apps/next/src/instrumentation-client.ts +++ b/apps/next/src/instrumentation-client.ts @@ -1,7 +1,7 @@ // https://docs.sentry.io/platforms/javascript/guides/nextjs/ import * as Sentry from '@sentry/nextjs'; -import { env } from './env.js'; +import { env } from '@/env'; Sentry.init({ dsn: env.NEXT_PUBLIC_SENTRY_DSN, diff --git a/apps/next/src/sentry.server.config.ts b/apps/next/src/sentry.server.config.ts index 12dc187..09cf6e0 100644 --- a/apps/next/src/sentry.server.config.ts +++ b/apps/next/src/sentry.server.config.ts @@ -1,6 +1,6 @@ import * as Sentry from '@sentry/nextjs'; -import { env } from './env.js'; +import { env } from '@/env'; Sentry.init({ dsn: env.NEXT_PUBLIC_SENTRY_DSN,