-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
36 lines (33 loc) · 876 Bytes
/
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
// @ts-check
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
});
const withSvgr = require('next-svgr');
const path = require('path');
const { withContentlayer } = require('next-contentlayer');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
pageExtensions: ['ts', 'tsx', 'js', 'jsx'],
eslint: {
dirs: ['src']
},
swcMinify: true,
sassOptions: {
includePaths: [path.join(__dirname, 'styles')]
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**'
}
],
formats: ['image/avif', 'image/webp']
},
transpilePackages: ['react-tweet']
};
module.exports = () => {
const plugins = [withBundleAnalyzer, withContentlayer, withSvgr];
return plugins.reduce((acc, plugin) => plugin(acc), { ...nextConfig });
};