-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
46 lines (41 loc) · 1.08 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//@ts-check
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { composePlugins, withNx } = require('./.nx-helpers/compiled.js')
const { createContentlayerPlugin } = require('next-contentlayer')
/**
* @type {import('./.nx-helpers/compiled.js').WithNxOptions}
**/
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
unoptimized: true,
domains: [
'images.unsplash.com',
'random.unsplash.com',
'github.com',
'avatars.githubusercontent.com',
],
formats: ['image/webp'],
},
experimental: {
esmExternals: true,
urlImports: ['https://cdn.skypack.dev'],
},
transpilePackages: ['@babel/runtime'],
output: 'export',
nx: {
// Set this to true if you would like to use SVGR
// See: https://github.com/gregberge/svgr
svgr: false,
},
}
const withContentlayer = createContentlayerPlugin({
configPath: 'apps/docs/contentlayer.config.ts',
})
const plugins = [
// Add more Next.js plugins to this list if needed.
withNx,
withContentlayer,
]
module.exports = composePlugins(...plugins)(nextConfig)