generated from jintak0401/next-tailwind-pnpm-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
76 lines (70 loc) · 1.64 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
const { withContentlayer } = require('next-contentlayer');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
/** @type {import('next').NextConfig} */
const nextConfig = withContentlayer(
withBundleAnalyzer({
reactStrictMode: true,
swcMinify: true,
experimental: {
serverComponentsExternalPackages: ['mysql2'],
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
pathname: '**',
},
{
protocol: 'http',
hostname: 'k.kakaocdn.net',
pathname: '**',
},
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
pathname: '**',
},
{
protocol: 'https',
hostname: 'ssl.pstatic.net',
pathname: '**',
},
{
protocol: 'https',
hostname: 'phinf.pstatic.net',
pathname: '**',
},
{
protocol: 'https',
hostname: 'imgur.com',
pathname: '**',
},
{
protocol: 'https',
hostname: 'i.imgur.com',
pathname: '**',
},
],
},
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: [
{
loader: '@svgr/webpack',
options: {
typescript: true,
icon: true,
},
},
],
});
return config;
},
})
);
module.exports = nextConfig;