-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
31 lines (29 loc) · 952 Bytes
/
next.config.js
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
// @ts-check
/* eslint-disable @typescript-eslint/no-var-requires */
const { env } = require('./src/server/env');
/**
* Don't be scared of the generics here.
* All they do is to give us autocompletion when using this.
*
* @template {import('next').NextConfig} T
* @param {T} config - A generic parameter that flows through to the return type
* @constraint {{import('next').NextConfig}}
*/
function getConfig(config) {
return config;
}
/**
* @link https://nextjs.org/docs/api-reference/next.config.js/introduction
*/
module.exports = getConfig({
/**
* Dynamic configuration available for the browser and server.
* Note: requires `ssr: true` or a `getInitialProps` in `_app.tsx`
* @link https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration
*/
publicRuntimeConfig: {
NODE_ENV: env.NODE_ENV,
},
/** We run eslint as a separate task in CI */
eslint: { ignoreDuringBuilds: !!process.env.CI },
});