refactor: Centralize Socket.IO client options in config for improved maintainability and consistency across prerender scripts
This commit is contained in:
@@ -69,11 +69,21 @@ const globalCssCollection = new Set();
|
||||
// Get webpack entrypoints
|
||||
const webpackEntrypoints = getWebpackEntrypoints();
|
||||
|
||||
/** Socket.IO client options for prerender scripts: skip backend connection counters (balanced on disconnect). */
|
||||
const socketIoClientOptions = {
|
||||
path: "/socket.io/",
|
||||
transports: ["websocket"],
|
||||
reconnection: false,
|
||||
timeout: 10000,
|
||||
auth: { prerender: true },
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
isProduction,
|
||||
outputDir,
|
||||
getWebpackEntrypoints,
|
||||
globalCss,
|
||||
globalCssCollection,
|
||||
webpackEntrypoints
|
||||
webpackEntrypoints,
|
||||
socketIoClientOptions,
|
||||
};
|
||||
Reference in New Issue
Block a user