Skip to content

Commit

Permalink
perf: improve build output
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Aug 5, 2024
1 parent 8cd65a2 commit 62fe057
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,15 @@ const wsProxies = ${JSON.stringify(toArray(wsPrefix))};
const cookiesOptions = ${JSON.stringify(cookiesOptions)};
const bodyParserOptions = ${JSON.stringify(bodyParserOptions)};
const priority = ${JSON.stringify(priority)};
const data = { mockData: transformMockData(transformRawData(rawData)) };
const mockConfig = {
mockData: transformMockData(transformRawData(rawData)),
on: () => {},
};
mockWebSocket(data, server, { wsProxies, cookiesOptions, logger });
mockWebSocket(mockConfig, server, { wsProxies, cookiesOptions, logger });
app.use(corsMiddleware());
app.use(baseMiddleware(data, {
app.use(baseMiddleware(mockConfig, {
formidableOptions: { multiples: true },
proxies,
priority,
Expand Down

0 comments on commit 62fe057

Please sign in to comment.