chore: pnpm workspace — landing, api, shared
apps/landing: Next.js 16 (App Router, standalone), Tailwind 4, ESLint с запретом импорта из api. apps/api: Hono + better-sqlite3, сборка tsup, /api/health. packages/shared: исходники TS без сборки. Vitest projects.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import path from 'node:path';
|
||||
import type { NextConfig } from 'next';
|
||||
|
||||
const config: NextConfig = {
|
||||
output: 'standalone',
|
||||
outputFileTracingRoot: path.join(import.meta.dirname, '../..'),
|
||||
transpilePackages: ['@kvarta/shared'],
|
||||
poweredByHeader: false,
|
||||
// в проде /api/ отдаёт nginx на контейнер api; локально проксируем на dev-сервер api
|
||||
async rewrites() {
|
||||
if (process.env.NODE_ENV === 'production') return [];
|
||||
return [{ source: '/api/:path*', destination: 'http://127.0.0.1:3001/api/:path*' }];
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user