-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.js
31 lines (27 loc) · 962 Bytes
/
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
/** @type {import('next').NextConfig} */
const { useAGiXTConfig } = require('./config/Hooks.js');
const {
mergeConfigs,
useBasicConfig,
useAuthConfig,
useOAuth2Config,
useStripeConfig,
useProductionSkipLintingConfig,
useCookiesConfig,
} = require('jrgcomponents/Config/Hooks');
// THIS FILE ONLY APPLIES TO RELEASES DONE USING THIS REPOSITORY AS A NEXTJS APP, IT DOES NOT APPLY WHEN THIS REPOSITORY IS USED AS A PACKAGE/COMPONENT.
const configs = [
useBasicConfig,
useAuthConfig,
useOAuth2Config,
useCookiesConfig,
useStripeConfig,
useAGiXTConfig,
useProductionSkipLintingConfig,
];
const nextConfig = configs.reduce((accumulator, config) => mergeConfigs(accumulator, config()), {});
// eslint-disable-next-line @typescript-eslint/no-var-requires
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: true,
});
module.exports = process.env.NEXT_ANALYZE === 'true' ? withBundleAnalyzer(nextConfig) : nextConfig;