diff --git a/packages/vite/src/node/publicUtils.ts b/packages/vite/src/node/publicUtils.ts
index 8a9ab56559815b..318c904047b2c0 100644
--- a/packages/vite/src/node/publicUtils.ts
+++ b/packages/vite/src/node/publicUtils.ts
@@ -5,13 +5,18 @@
  */
 export { VERSION as version } from './constants'
 export { version as esbuildVersion } from 'esbuild'
-export { VERSION as rollupVersion } from 'rollup'
 export {
   splitVendorChunkPlugin,
   splitVendorChunk,
   isCSSRequest,
 } from './plugins/splitVendorChunk'
-export { normalizePath, mergeConfig, mergeAlias, createFilter } from './utils'
+export {
+  normalizePath,
+  mergeConfig,
+  mergeAlias,
+  createFilter,
+  rollupVersion,
+} from './utils'
 export { send } from './server/send'
 export { createLogger } from './logger'
 export { searchForWorkspaceRoot } from './server/searchRoot'
diff --git a/packages/vite/src/node/server/pluginContainer.ts b/packages/vite/src/node/server/pluginContainer.ts
index fa2dd4167fce5d..551b210418363d 100644
--- a/packages/vite/src/node/server/pluginContainer.ts
+++ b/packages/vite/src/node/server/pluginContainer.ts
@@ -32,7 +32,6 @@ SOFTWARE.
 import fs from 'node:fs'
 import { join } from 'node:path'
 import { performance } from 'node:perf_hooks'
-import { VERSION as rollupVersion } from 'rollup'
 import { parseAst as rollupParseAst } from 'rollup/parseAst'
 import type {
   AsyncPluginHooks,
@@ -74,6 +73,7 @@ import {
   normalizePath,
   numberToPos,
   prettifyUrl,
+  rollupVersion,
   timeFrom,
   unwrapId,
 } from '../utils'
diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts
index 73c3806cc9fd44..a949fd60851313 100644
--- a/packages/vite/src/node/utils.ts
+++ b/packages/vite/src/node/utils.ts
@@ -162,6 +162,16 @@ export const deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//
 // TODO: use import()
 const _require = createRequire(import.meta.url)
 
+export function resolveDependencyVersion(
+  dep: string,
+  pkgRelativePath = '../../package.json',
+): string {
+  const pkgPath = path.resolve(_require.resolve(dep), pkgRelativePath)
+  return JSON.parse(fs.readFileSync(pkgPath, 'utf-8')).version
+}
+
+export const rollupVersion = resolveDependencyVersion('rollup')
+
 // set in bin/vite.js
 const filter = process.env.VITE_DEBUG_FILTER