forked from beilunyang/moemail
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
39 lines (32 loc) · 860 Bytes
/
next.config.ts
File metadata and controls
39 lines (32 loc) · 860 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
import withPWA from 'next-pwa'
import createNextIntlPlugin from 'next-intl/plugin'
import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev';
async function setup() {
if (process.env.NODE_ENV === 'development') {
await setupDevPlatform()
}
}
setup()
const withNextIntl = createNextIntlPlugin('./app/i18n/request.ts')
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
},
{
protocol: 'https',
hostname: '*.googleusercontent.com',
}
],
},
};
const withPWAConfigured = withPWA({
dest: 'public',
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === 'development',
}) as any
const configWithPWA = withPWAConfigured(nextConfig as any) as any
export default withNextIntl(configWithPWA)