-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnext.config.js
48 lines (44 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
47
48
const withMdxBuilder = require('next-mdx-builder')
const withBundleAnalyzer = require('@next/bundle-analyzer')
const { withPlaiceholder } = require('@plaiceholder/next')
const plugins = [
withMdxBuilder({}),
withBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
}),
withPlaiceholder,
]
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
productionBrowserSourceMaps: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
transpilePackages: ['@camwiegert/typical'],
webpack(config) {
config.plugins.push(
require('unplugin-icons/webpack').default({
compiler: 'jsx',
jsx: 'react',
}),
)
return config
},
redirects() {
return [
{
source: '/qr',
destination: '/qr/right',
permanent: true,
},
{
source: '/experiments/benchmarks',
destination: '/projects/benchmarks',
permanent: true,
},
]
},
images: {
domains: ['cdn.hashnode.com'],
},
}
module.exports = () => plugins.reduce((acc, next) => next(acc), config)