Skip to content

Commit 39dfd9a

Browse files
committed
perf: avoid buildStart hook call
1 parent b02c42a commit 39dfd9a

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
@@ -977,10 +977,12 @@ export async function _createServer(
977977
if (initingServer) return initingServer
978978

979979
initingServer = (async function () {
980-
// For backward compatibility, we call buildStart for the client
981-
// environment when initing the server. For other environments
982-
// buildStart will be called when the first request is transformed
983-
await environments.client.pluginContainer.buildStart()
980+
if (!config.experimental.fullBundleMode) {
981+
// For backward compatibility, we call buildStart for the client
982+
// environment when initing the server. For other environments
983+
// buildStart will be called when the first request is transformed
984+
await environments.client.pluginContainer.buildStart()
985+
}
984986

985987
// ensure ws server started
986988
if (onListen || options.listen) {

0 commit comments

Comments
 (0)