Skip to content

Commit e59141d

Browse files
committed
perf: avoid buildStart hook call
1 parent ddf0287 commit e59141d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/vite/src/node/server/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,10 +951,12 @@ export async function _createServer(
951951
if (initingServer) return initingServer
952952

953953
initingServer = (async function () {
954-
// For backward compatibility, we call buildStart for the client
955-
// environment when initing the server. For other environments
956-
// buildStart will be called when the first request is transformed
957-
await environments.client.pluginContainer.buildStart()
954+
if (!config.experimental.fullBundleMode) {
955+
// For backward compatibility, we call buildStart for the client
956+
// environment when initing the server. For other environments
957+
// buildStart will be called when the first request is transformed
958+
await environments.client.pluginContainer.buildStart()
959+
}
958960

959961
// ensure ws server started
960962
if (onListen || options.listen) {

0 commit comments

Comments
 (0)