-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnext.config.mjs
37 lines (35 loc) · 1 KB
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
import { env } from './src/env.js';
import createNextIntlPlugin from 'next-intl/plugin';
const withNextIntl = createNextIntlPlugin();
/** @type {import("next").NextConfig} */
const nextConfig = {
experimental: {
authInterrupts: true
},
async rewrites() {
if (!env.CLOUD_HOST) return [];
return {
beforeFiles: [
{
source: '/:path((?!api|dash|auth|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)',
destination: `${env.DOCS_BASE}/:path*`,
has: [
{
type: "host",
value: env.CLOUD_HOST,
},
],
},
],
}
},
serverExternalPackages: ["vmapi"],
// Already doing linting and typechecking as separate tasks in CI
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },
};
export default withNextIntl(nextConfig);