Skip to content

Commit

Permalink
chore(build): ignore insignificant warning logs
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Mar 9, 2024
1 parent 49e4270 commit 2082fa5
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 46 deletions.
124 changes: 82 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api/backend/api/systemSse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable */
import { request, type RequestOptions } from '@/utils/request';

/** 此处后端没有提供注释 GET /api/sse/${param0} */
/** 服务端推送消息 GET /api/sse/${param0} */
export async function sseSse(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.SseSseParams,
Expand Down
14 changes: 11 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
},
},
build: {
target: 'es2022',
target: 'es2020',
minify: 'esbuild',
cssTarget: 'chrome89',
chunkSizeWarningLimit: 2000,
Expand All @@ -149,11 +149,19 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
return 'vendor';
} else if (id.includes('ant-design-vue')) {
return 'vendor';
} else if (id.includes('/src/api/index.ts')) {
return 'api';
}
},
},
onwarn(warning, rollupWarn) {
// ignore circular dependency warning
if (
warning.code === 'CYCLIC_CROSS_CHUNK_REEXPORT' &&
warning.exporter?.includes('src/api/')
) {
return;
}
rollupWarn(warning);
},
},
},
};
Expand Down

0 comments on commit 2082fa5

Please sign in to comment.