-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
43 lines (40 loc) · 974 Bytes
/
next.config.mjs
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
import NextBundleAnalyzer from '@next/bundle-analyzer';
const withBundleAnalyzer = NextBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
/** @type {import("next").NextConfig} */
const config = {
// build 阶段禁止 eslint
eslint: { ignoreDuringBuilds: true },
// build 阶段禁止 ts 类型检查
typescript: {
ignoreBuildErrors: true,
},
// Next.js 开发模式默认会开启 React Strict Mode,会渲染2次,我们不需要
reactStrictMode: false,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**.aliyuncs.com',
},
{
protocol: 'http',
hostname: '**.aliyuncs.com',
},
{
protocol: 'https',
hostname: 'placehold.co',
},
{
protocol: 'http',
hostname: 'placehold.co',
},
{
protocol: 'http',
hostname: 'localhost',
},
],
},
};
export default withBundleAnalyzer(config);