-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
30 lines (27 loc) · 1011 Bytes
/
Copy pathnext.config.ts
File metadata and controls
30 lines (27 loc) · 1011 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
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
webpack: (config, { isServer }) => {
if (isServer) {
// Externalize typeorm on server side to avoid bundling optional drivers
config.externals = config.externals || [];
config.externals.push({
'typeorm': 'typeorm',
'typeorm/globals': 'typeorm/globals',
'typeorm/driver/DriverFactory': 'typeorm/driver/DriverFactory',
});
// Suppress warnings for optional typeorm drivers not included
config.ignoreWarnings = config.ignoreWarnings || [];
config.ignoreWarnings.push({
module: /node_modules\/typeorm/,
message: /Can't resolve.*(?:react-native-sqlite-storage|@sap\/hana-client|mysql|oracle|pg)/,
});
config.ignoreWarnings.push({
module: /node_modules\/typeorm/,
message: /Critical dependency: the request of a dependency is an expression/,
});
}
return config;
},
};
export default nextConfig;