Skip to content

Commit

Permalink
chore: rename next.config.js to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Dec 14, 2024
1 parent 049c27f commit f5935f2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
19 changes: 0 additions & 19 deletions client/next.config.js

This file was deleted.

23 changes: 23 additions & 0 deletions client/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { NextConfig } from 'next';
import { NEXT_PUBLIC_API_BASE_PATH, NEXT_PUBLIC_SERVER_PORT } from 'utils/envValues';

const nextConfig: NextConfig = {
reactStrictMode: true,
pageExtensions: ['page.tsx'],
trailingSlash: true,
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },
webpack: (config) => {
config.resolve.symlinks = false;

return config;
},
rewrites: async () => [
{
source: `${NEXT_PUBLIC_API_BASE_PATH}/:path*`,
destination: `http://localhost:${NEXT_PUBLIC_SERVER_PORT}${NEXT_PUBLIC_API_BASE_PATH}/:path*`,
},
],
};

export default nextConfig;
2 changes: 2 additions & 0 deletions client/utils/envValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ const NEXT_PUBLIC_COGNITO_POOL_ENDPOINT = z
.string()
.parse(process.env.NEXT_PUBLIC_COGNITO_POOL_ENDPOINT);
const NEXT_PUBLIC_OAUTH_DOMAIN = z.string().optional().parse(process.env.NEXT_PUBLIC_OAUTH_DOMAIN);
const NEXT_PUBLIC_SERVER_PORT = z.string().parse(process.env.NEXT_PUBLIC_SERVER_PORT);

export {
NEXT_PUBLIC_API_BASE_PATH,
NEXT_PUBLIC_COGNITO_POOL_ENDPOINT,
NEXT_PUBLIC_COGNITO_USER_POOL_CLIENT_ID,
NEXT_PUBLIC_COGNITO_USER_POOL_ID,
NEXT_PUBLIC_OAUTH_DOMAIN,
NEXT_PUBLIC_SERVER_PORT,
};

0 comments on commit f5935f2

Please sign in to comment.