Skip to content

Commit 9265346

Browse files
committed
chore: disable BuildModuleGraph
1 parent ee78cec commit 9265346

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

packages/vite/src/node/build.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import type { RollupPluginHooks } from './typeUtils'
9393
import { buildOxcPlugin } from './plugins/oxc'
9494
import type { ViteDevServer } from './server'
9595
import { getHmrImplement } from './plugins/clientInjections'
96-
import { buildModuleGraphPlugin } from './server/buildModuleGraph'
96+
// import { buildModuleGraphPlugin } from './server/buildModuleGraph'
9797

9898
export interface BuildEnvironmentOptions {
9999
/**
@@ -648,9 +648,9 @@ async function buildEnvironment(
648648
injectEnvironmentToHooks(environment, chunkMetadataMap, p),
649649
)
650650

651-
if (server) {
652-
plugins.push(buildModuleGraphPlugin(server))
653-
}
651+
// if (server) {
652+
// plugins.push(buildModuleGraphPlugin(server))
653+
// }
654654

655655
const rollupOptions: RolldownOptions = {
656656
// preserveEntrySignatures: ssr

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ import type { DevEnvironment } from './environment'
101101
import { hostCheckMiddleware } from './middlewares/hostCheck'
102102
import { memoryFilesMiddleware } from './middlewares/memoryFiles'
103103
import { rejectInvalidRequestMiddleware } from './middlewares/rejectInvalidRequest'
104-
import { BuildModuleGraph } from './buildModuleGraph'
104+
import type { BuildModuleGraph } from './buildModuleGraph'
105105

106106
export interface ServerOptions extends CommonServerOptions {
107107
/**
@@ -532,12 +532,14 @@ export async function _createServer(
532532

533533
// Backward compatibility
534534

535-
let moduleGraph = config.experimental.fullBundleMode
536-
? new BuildModuleGraph()
537-
: new ModuleGraph({
538-
client: () => environments.client.moduleGraph,
539-
ssr: () => environments.ssr.moduleGraph,
540-
})
535+
let moduleGraph =
536+
// config.experimental.fullBundleMode
537+
// ? new BuildModuleGraph()
538+
// :
539+
new ModuleGraph({
540+
client: () => environments.client.moduleGraph,
541+
ssr: () => environments.ssr.moduleGraph,
542+
})
541543
const pluginContainer = createPluginContainer(environments)
542544

543545
const closeHttpServer = createServerCloseFn(httpServer)

0 commit comments

Comments
 (0)