-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.js
49 lines (47 loc) · 1.51 KB
/
next.config.js
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
47
48
49
/** @type {import('next').NextConfig} */
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const withTM = require('next-transpile-modules')(['openaccount-connect', '@passwordless-id/webauthn']);
const nextConfig = {
reactStrictMode: false,
swcMinify: true,
trailingSlash: true,
experimental: { esmExternals: 'loose' },
exportPathMap: async function (defaultPathMap, { dev, dir, outDir, distDir, buildId }) {
return {
'/': { page: '/welcome' },
'/FAQs': { page: '/FAQs' },
'/privacy-policy': { page: '/privacy-policy' },
'/terms-of-service': { page: '/terms-of-service' },
'/mailbox': { page: '/mailbox' },
};
},
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
images: {
unoptimized: true,
},
sassOptions: {
includePaths: ['**/*.scss'],
},
// 配置页面缓存
// 这里使用了缓存策略,可以根据需要进行调整
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=3600, must-revalidate',
},
],
},
];
},
};
module.exports = withTM(withBundleAnalyzer(nextConfig));