EvoCalculator.Client2/next.config.js
2022-12-21 11:28:51 +03:00

40 lines
1.1 KiB
JavaScript

/* eslint-disable operator-linebreak */
/* eslint-disable @typescript-eslint/no-var-requires */
const { withPlugins } = require('next-composed-plugins');
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
output: 'standalone',
swcMinify: true,
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: true,
},
compiler: {
styledComponents: true,
},
rewrites:
process.env.NODE_ENV === 'development' &&
async function rewrites() {
return [
{
source: process.env.NEXT_PUBLIC_URL_CRM_GRAPHQL_PROXY,
destination: process.env.NEXT_PUBLIC_URL_CRM_GRAPHQL_DIRECT,
},
{
source: process.env.NEXT_PUBLIC_URL_GET_USER_PROXY,
destination: process.env.NEXT_PUBLIC_URL_GET_USER_DIRECT,
},
{
source: process.env.NEXT_PUBLIC_URL_CORE_FINGAP_PROXY,
destination: process.env.NEXT_PUBLIC_URL_CORE_FINGAP_DIRECT,
},
];
},
};
const plugins = [];
module.exports = withPlugins(nextConfig, plugins);