forked from huglemon/nextjs-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
45 lines (39 loc) · 969 Bytes
/
Copy pathnext.config.mjs
File metadata and controls
45 lines (39 loc) · 969 Bytes
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
import createNextIntlPlugin from 'next-intl/plugin';
const withNextIntl = createNextIntlPlugin('./i18n/request.js');
/** @type {import('next').NextConfig} */
const nextConfig = {
/* config options here */
reactStrictMode: false, // 关闭后再重启 dev 服务器
// 明确指定项目根目录
turbopack: {
root: import.meta.dirname,
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'r2.nextjsbase.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: '*.googleusercontent.com',
pathname: '/**',
},
],
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
};
export default withNextIntl(nextConfig);