UNPKG

1.78 kBTypeScriptView Raw
1import { Header, Redirect, Rewrite } from '../../lib/load-custom-routes';
2export declare type DomainLocales = Array<{
3 http?: true;
4 domain: string;
5 locales?: string[];
6 defaultLocale: string;
7}>;
8export declare type NextConfig = {
9 [key: string]: any;
10} & {
11 cleanDistDir?: boolean;
12 i18n?: {
13 locales: string[];
14 defaultLocale: string;
15 domains?: DomainLocales;
16 localeDetection?: false;
17 } | null;
18 headers?: () => Promise<Header[]>;
19 rewrites?: () => Promise<Rewrite[] | {
20 beforeFiles: Rewrite[];
21 afterFiles: Rewrite[];
22 fallback: Rewrite[];
23 }>;
24 redirects?: () => Promise<Redirect[]>;
25 trailingSlash?: boolean;
26 webpack5?: false;
27 excludeDefaultMomentLocales?: boolean;
28 future: {
29 /**
30 * @deprecated this options was moved to the top level
31 */
32 webpack5?: false;
33 strictPostcssConfiguration?: boolean;
34 };
35 experimental: {
36 cpus?: number;
37 plugins?: boolean;
38 profiling?: boolean;
39 sprFlushToDisk?: boolean;
40 reactMode?: 'legacy' | 'concurrent' | 'blocking';
41 workerThreads?: boolean;
42 pageEnv?: boolean;
43 optimizeImages?: boolean;
44 optimizeCss?: boolean;
45 scrollRestoration?: boolean;
46 stats?: boolean;
47 externalDir?: boolean;
48 conformance?: boolean;
49 amp?: {
50 optimizer?: any;
51 validator?: string;
52 skipValidation?: boolean;
53 };
54 reactRoot?: boolean;
55 disableOptimizedLoading?: boolean;
56 gzipSize?: boolean;
57 craCompat?: boolean;
58 };
59};
60export declare const defaultConfig: NextConfig;
61export declare function normalizeConfig(phase: string, config: any): any;