{"record":{"id":"c78148c767dca92b","repo":"vitejs/vite","slug":"currently-full-bundle-mode-is-only-available-for-c","errorCode":null,"errorMessage":"currently full bundle mode is only available for client environment","messagePattern":"currently full bundle mode is only available for client environment","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vite/src/node/server/bundledDev.ts","lineNumber":93,"sourceCode":"  private reloadNeededClientIds = new Set<string>()\n  private debouncedReloadNeededFlush = debounce(20, () => {\n    if (this.lastBuildError || this.reloadNeededClientIds.size === 0) return\n    for (const clientId of this.reloadNeededClientIds) {\n      this.clients.get(clientId)?.send({ type: 'full-reload', path: '*' })\n    }\n    this.reloadNeededClientIds.clear()\n    this.environment.logger.info(colors.green(`page reload`), {\n      timestamp: true,\n    })\n  })\n\n  private lastBuildError: Error | null = null\n\n  memoryFiles: MemoryFiles = new MemoryFiles()\n\n  constructor(private environment: DevEnvironment) {\n    if (environment.name !== 'client') {\n      throw new Error(\n        'currently full bundle mode is only available for client environment',\n      )\n    }\n  }\n\n  private get devEngine(): DevEngine {\n    if (!this._devEngine) {\n      throw new Error(`dev engine was not yet initialized`)\n    }\n    return this._devEngine\n  }\n\n  private pendingPayloadFilenames = new Set<string>()\n\n  get hasBuildOutput(): boolean {\n    return (\n      this.memoryFiles.size > 1 ||\n      (this.memoryFiles.size === 1 &&","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/vitejs/vite/blob/b4d66fee14d970f45b8a6f3d7d6aee73ca9b88ab/packages/vite/src/node/server/bundledDev.ts#L75-L111","documentation":"BundledDev (the experimental full-bundle dev server, environment.isBundled or config.experimental.bundledDev) is constructed with a DevEnvironment. Its constructor asserts environment.name === 'client' because the bundled dev pipeline is currently implemented only for the client environment. Any other environment name throws.","triggerScenarios":"Enabling bundled dev for a non-client environment — e.g. marking a custom SSR or RTE environment with isBundled: true, or the constructor receiving an environment named 'ssr'/'rte'/custom. The throw fires at BundledDev construction time inside DevEnvironment.","commonSituations":"Adopting environments-based config and setting isBundled on an SSR environment expecting bundle dev there; or a misnamed client environment (name not exactly 'client').","solutions":["Keep bundled dev enabled only for the environment named 'client'.","For SSR/custom environments, leave isBundled unset (they use the normal deps-optimizer pipeline).","If you renamed the client environment, restore name: 'client' or restructure config so bundled dev applies to the client env only.","Track Vite releases for when bundled dev expands to other environments."],"exampleFix":"// before\nenvironments: { ssr: { isBundled: true } }\n// after\nenvironments: { client: { isBundled: true } }\n// or leave ssr without isBundled","handlingStrategy":"validation","validationCode":"function assertBundledClientOnly(envName) {\n  if (envName !== 'client') throw new Error('BundledDev only supports the client environment')\n}\nassertBundledClientOnly(env.name)","typeGuard":"function isClientEnvironment(env): boolean {\n  return env.name === 'client'\n}","tryCatchPattern":null,"preventionTips":["Enable isBundled only on the client environment.","Keep SSR/RTE environments on the default pipeline.","Track Vite changelog for expanded bundled-dev support."],"tags":["bundled-dev","environments","experimental","config"],"backgroundTag":null,"analyzedSha":"b4d66fee14d970f45b8a6f3d7d6aee73ca9b88ab","analyzedAt":"2026-08-11T11:49:19.515Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}