chore: disable http proxy middleware log in ci (#11238)
This commit is contained in:
@@ -72,6 +72,7 @@ export function createWebpackConfig(
|
|||||||
flags: BuildFlags
|
flags: BuildFlags
|
||||||
): webpack.Configuration {
|
): webpack.Configuration {
|
||||||
const buildConfig = getBuildConfig(pkg, flags);
|
const buildConfig = getBuildConfig(pkg, flags);
|
||||||
|
const httpProxyMiddlewareLogLevel = process.env.CI ? 'silent' : 'error';
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
name: 'affine',
|
name: 'affine',
|
||||||
@@ -340,6 +341,7 @@ export function createWebpackConfig(
|
|||||||
liveReload: true,
|
liveReload: true,
|
||||||
client: {
|
client: {
|
||||||
overlay: process.env.DISABLE_DEV_OVERLAY === 'true' ? false : undefined,
|
overlay: process.env.DISABLE_DEV_OVERLAY === 'true' ? false : undefined,
|
||||||
|
logging: process.env.CI ? 'none' : 'error',
|
||||||
},
|
},
|
||||||
historyApiFallback: {
|
historyApiFallback: {
|
||||||
rewrites: [
|
rewrites: [
|
||||||
@@ -362,9 +364,22 @@ export function createWebpackConfig(
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
proxy: [
|
proxy: [
|
||||||
{ context: '/api', target: 'http://localhost:3010' },
|
{
|
||||||
{ context: '/socket.io', target: 'http://localhost:3010', ws: true },
|
context: '/api',
|
||||||
{ context: '/graphql', target: 'http://localhost:3010' },
|
target: 'http://localhost:3010',
|
||||||
|
logLevel: httpProxyMiddlewareLogLevel,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
context: '/socket.io',
|
||||||
|
target: 'http://localhost:3010',
|
||||||
|
ws: true,
|
||||||
|
logLevel: httpProxyMiddlewareLogLevel,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
context: '/graphql',
|
||||||
|
target: 'http://localhost:3010',
|
||||||
|
logLevel: httpProxyMiddlewareLogLevel,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
} as DevServerConfiguration,
|
} as DevServerConfiguration,
|
||||||
} satisfies webpack.Configuration;
|
} satisfies webpack.Configuration;
|
||||||
|
|||||||
Reference in New Issue
Block a user