mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
chore: disable http proxy middleware log in ci (#11238)
This commit is contained in:
@@ -72,6 +72,7 @@ export function createWebpackConfig(
|
||||
flags: BuildFlags
|
||||
): webpack.Configuration {
|
||||
const buildConfig = getBuildConfig(pkg, flags);
|
||||
const httpProxyMiddlewareLogLevel = process.env.CI ? 'silent' : 'error';
|
||||
|
||||
const config = {
|
||||
name: 'affine',
|
||||
@@ -340,6 +341,7 @@ export function createWebpackConfig(
|
||||
liveReload: true,
|
||||
client: {
|
||||
overlay: process.env.DISABLE_DEV_OVERLAY === 'true' ? false : undefined,
|
||||
logging: process.env.CI ? 'none' : 'error',
|
||||
},
|
||||
historyApiFallback: {
|
||||
rewrites: [
|
||||
@@ -362,9 +364,22 @@ export function createWebpackConfig(
|
||||
},
|
||||
],
|
||||
proxy: [
|
||||
{ context: '/api', target: 'http://localhost:3010' },
|
||||
{ context: '/socket.io', target: 'http://localhost:3010', ws: true },
|
||||
{ context: '/graphql', target: 'http://localhost:3010' },
|
||||
{
|
||||
context: '/api',
|
||||
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,
|
||||
} satisfies webpack.Configuration;
|
||||
|
||||
Reference in New Issue
Block a user