forked from boxyhq/jackson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
100 lines (96 loc) · 2.68 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
const { i18n } = require('./next-i18next.config');
/** @type {import('next').NextConfig} */
module.exports = {
productionBrowserSourceMaps: true,
reactStrictMode: true,
i18n,
output: 'standalone',
webpack: (config, { webpack, isServer }) => {
if (isServer) {
// Module not found
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp:
/(^@google-cloud\/spanner|^@mongodb-js\/zstd|^aws-crt|^aws4$|^pg-native$|^mongodb-client-encryption$|^@sap\/hana-client$|^snappy$|^react-native-sqlite-storage$|^bson-ext$|^cardinal$|^kerberos$|^hdb-pool$|^sql.js$|^sqlite3$|^better-sqlite3$|^ioredis$|^typeorm-aurora-data-api-driver$|^pg-query-stream$|^oracledb$|^mysql$|^snappy\/package\.json$|^cloudflare:sockets$)/,
})
);
}
config.module = {
...config.module,
exprContextCritical: false,
};
return config;
},
rewrites: async () => {
return [
{
source: '/.well-known/saml.cer',
destination: '/api/well-known/saml.cer',
},
{
source: '/.well-known/openid-configuration',
destination: '/api/well-known/openid-configuration',
},
{
source: '/.well-known/sp-metadata',
destination: '/api/well-known/sp-metadata',
},
{
source: '/.well-known/idp-metadata',
destination: '/api/well-known/idp-metadata',
},
{
source: '/.well-known/saml-configuration',
destination: '/well-known/saml-configuration',
},
{
source: '/.well-known/idp-configuration',
destination: '/well-known/idp-configuration',
},
{
source: '/oauth/jwks',
destination: '/api/oauth/jwks',
},
{
source: '/admin/directory-sync/setup-link',
destination: '/admin/setup-link',
},
{
source: '/admin/sso-connection/setup-link',
destination: '/admin/setup-link',
},
{
source: '/admin/sso-connection/setup-link/new',
destination: '/admin/setup-link/new',
},
{
source: '/admin/directory-sync/setup-link/new',
destination: '/admin/setup-link/new',
},
{
source: '/.well-known',
destination: '/well-known',
},
{
source: '/admin/settings',
destination: '/admin/settings/sso-connection',
},
{
source: '/api/v1/connections/:path*',
destination: '/api/v1/sso/:path*',
},
{
source: '/api/v1/directory-sync/:path*',
destination: '/api/v1/dsync/:path*',
},
];
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '*',
},
],
},
};