-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.js
More file actions
33 lines (31 loc) · 934 Bytes
/
Copy pathnext.config.js
File metadata and controls
33 lines (31 loc) · 934 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
const withBundleAnalyzer =
process.env.ANALYZE === 'true'
? // eslint-disable-next-line @typescript-eslint/no-require-imports
require('@next/bundle-analyzer')({
enabled: true,
})
: (a) => a;
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages:
process.env.NODE_ENV === 'test'
? [
'intl-messageformat',
'@formatjs/intl-localematcher',
'@formatjs/ecma402-abstract',
'@formatjs/fast-memoize',
'@formatjs/bigdecimal',
'@formatjs/icu-skeleton-parser',
'@formatjs/icu-messageformat-parser',
]
: [],
reactStrictMode: false,
pageExtensions: ['ts', 'tsx', 'js'],
experimental: {
swcPlugins:
process.env.NEXT_PUBLIC_CYPRESS && false
? [[require.resolve('swc-plugin-coverage-instrument'), {}]]
: [],
},
};
module.exports = withBundleAnalyzer(nextConfig);