-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathnext.config.js
More file actions
34 lines (32 loc) · 837 Bytes
/
next.config.js
File metadata and controls
34 lines (32 loc) · 837 Bytes
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
/** @type {import('next').NextConfig} */
const isCoverage = process.env.CYPRESS_COVERAGE === 'true'
const nextConfig = {
output: 'standalone',
turbopack: {
root: __dirname,
},
experimental: {
instrumentationHook: true,
// Force all static pages into a single worker to prevent QEMU SIGILL
// crashes during cross-architecture Docker builds (arm64 emulation).
staticGenerationMinPagesPerWorker: 100,
},
webpack(config) {
if (isCoverage) {
config.module.rules.push({
test: /\.(js|ts|jsx|tsx)$/,
exclude: /node_modules/,
enforce: 'post',
use: {
loader: 'babel-loader',
options: {
presets: ['next/babel'],
plugins: ['istanbul'],
},
},
})
}
return config
},
}
module.exports = nextConfig