-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.mjs
46 lines (41 loc) · 859 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
44
45
46
import nextPWA from 'next-pwa';
const ENV_KYES = [
'DEFAULT_MODE',
'DEFAULT_THEME',
'DEFAULT_LANGUAGE',
'SITE_URL',
'API_URL',
'EMAIL',
'GITHUB_LINK',
'TWITTER_LINK',
'DISCORD_LINK',
'INSTAGRAM_LINK',
'LINKEDIN_LINK',
'GOOGLE_TAG_MANAGER_ID',
'GOOGLE_ANALYTICS_ID',
'YANDEX_ANALYTICS_ID',
'FACEBOOK_ANALYTICS_ID',
'BAIDU_ANALYTICS_ID',
];
const env = Object.fromEntries(ENV_KYES.map((key) => [key, process.env[key]]));
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
env,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
port: '',
pathname: '/**',
},
],
},
swcMinify: true,
};
const withPWA = nextPWA({
dest: 'public',
disable: process.env.NODE_ENV === 'development',
});
export default withPWA(nextConfig);