forked from PeopleForBikes/bna-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
93 lines (75 loc) · 2.8 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import path, { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = dirname(fileURLToPath(import.meta.url));
/** @type {import('next').NextConfig} */
const nextConfig = {
// Use the CDN in production and localhost for development.
// assetPrefix: process.env.IS_PROD === 'true'
// ? 'https://cdn.mycdn.com'
// : undefined,
// https://nextjs.org/docs/app/api-reference/next-config-js/compress#changing-the-compression-algorithm
// For self-hosting this will need to be updated
compress: true,
devIndicators: {
buildActivityPosition: 'bottom-right'
},
// distDir: 'build',
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: false
},
// Only load the modules you are actually using, while still giving you the convenience of
// writing import statements with many named exports.
experimental: {
optimizePackageImports: [],
turbotrace: {
// control the log level of the turbotrace, default is `error`
logLevel: 'error',
// control if the log of turbotrace should contain the details of the analysis, default is `false`
logDetail: false,
/**
* show all log messages without limit
* turbotrace only show 1 log message for each categories by default
*/
// logAll: false,
/**
* control the context directory of the turbotrace
* files outside of the context directory will not be traced
* set the `experimental.outputFileTracingRoot` has the same effect
* if the `experimental.outputFileTracingRoot` and this option are both set, the `experimental.turbotrace.contextDirectory` will be used
*/
outputFileTracingRoot: path.join(__dirname, '../../'),
// contextDirectory?: string
/**
* if there is `process.cwd()` expression in your code, you can set this option to tell `turbotrace` the value of `process.cwd()` while tracing.
* for example the require(process.cwd() + '/package.json') will be traced as require('/path/to/cwd/package.json')
*/
// processCwd?: string
// control the maximum memory usage of the `turbotrace`, in `MB`, default is `6000`.
memoryLimit: 6000
},
typedRoutes: true
},
// generateBuildId: async () => {
// // This could be anything, using the latest git hash
// return process.env.GIT_HASH;
// },
generateEtags: true,
httpAgentOptions: {
keepAlive: true
},
// handle cache
// cacheHandler: require.resolve('./cache-handler.js'),
// cacheMaxMemorySize: 0, // disable default in-memory caching
logging: {
fetches: {
fullUrl: false
}
},
poweredByHeader: false,
typescript: {
ignoreBuildErrors: true
}
};
export default nextConfig;