-
Notifications
You must be signed in to change notification settings - Fork 818
Expand file tree
/
Copy pathnext.config.ts
More file actions
34 lines (30 loc) · 899 Bytes
/
next.config.ts
File metadata and controls
34 lines (30 loc) · 899 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
import createNextIntlPlugin from 'next-intl/plugin';
import type { NextConfig } from "next";
const isProd = process.env.NODE_ENV === 'production';
const internalHost = process.env.TAURI_DEV_HOST || 'localhost';
const withNextIntl = createNextIntlPlugin();
const nextConfig: NextConfig = {
/* config options here */
output: "export",
images: {
unoptimized: true,
},
assetPrefix: isProd ? undefined : `http://${internalHost}:3456`,
sassOptions: {
silenceDeprecations: ['legacy-js-api'],
},
reactStrictMode: false,
turbopack: {},
devIndicators: false,
webpack: (config) => {
// 过滤掉 flushSync 警告 - 来自 Tiptap 编辑器的已知问题
config.stats = {
...config.stats,
warningsFilter: (warning: string) => {
return !warning.includes('flushSync');
}
};
return config;
}
};
export default withNextIntl(nextConfig);