next.config.js: use rewrites only for development
This commit is contained in:
parent
ab0670ddf8
commit
eea7109fe6
@ -1,3 +1,4 @@
|
||||
/* eslint-disable operator-linebreak */
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const withPlugins = require('next-compose-plugins');
|
||||
const withLess = require('next-with-less');
|
||||
@ -23,6 +24,16 @@ const nextConfig = {
|
||||
},
|
||||
},
|
||||
},
|
||||
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,
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
const plugins = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user