Skip to content

Commit 96683ff

Browse files
committed
perf: avoid buildStart hook call
1 parent 21be879 commit 96683ff

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
@@ -979,10 +979,12 @@ export async function _createServer(
979979
if (initingServer) return initingServer
980980

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

987989
// ensure ws server started
988990
if (onListen || options.listen) {

0 commit comments

Comments
 (0)