RunnableDevEnvironment Class — vite Architecture
Architecture documentation for the RunnableDevEnvironment class in runnableEnvironment.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 8886b4fc_682a_2fd8_f88b_60dc42dfb6bc["RunnableDevEnvironment"] e21da89c_08b2_d4be_4023_7ef3ad334bdb["runnableEnvironment.ts"] 8886b4fc_682a_2fd8_f88b_60dc42dfb6bc -->|defined in| e21da89c_08b2_d4be_4023_7ef3ad334bdb 36ef67eb_a698_1443_ac9d_7a0f8db79857["constructor()"] 8886b4fc_682a_2fd8_f88b_60dc42dfb6bc -->|method| 36ef67eb_a698_1443_ac9d_7a0f8db79857 6b0c477c_d342_aabf_d3b5_a7ab39a140ee["runner()"] 8886b4fc_682a_2fd8_f88b_60dc42dfb6bc -->|method| 6b0c477c_d342_aabf_d3b5_a7ab39a140ee 20a6c33d_fca7_195b_3baa_d6c09fd1b850["close()"] 8886b4fc_682a_2fd8_f88b_60dc42dfb6bc -->|method| 20a6c33d_fca7_195b_3baa_d6c09fd1b850
Relationship Graph
Source Code
packages/vite/src/node/server/environments/runnableEnvironment.ts lines 43–78
class RunnableDevEnvironment extends DevEnvironment {
private _runner: ModuleRunner | undefined
private _runnerFactory:
| ((
environment: RunnableDevEnvironment,
options?: ServerModuleRunnerOptions,
) => ModuleRunner)
| undefined
private _runnerOptions: ServerModuleRunnerOptions | undefined
constructor(
name: string,
config: ResolvedConfig,
context: RunnableDevEnvironmentContext,
) {
super(name, config, context as DevEnvironmentContext)
this._runnerFactory = context.runner
this._runnerOptions = context.runnerOptions
}
get runner(): ModuleRunner {
if (this._runner) {
return this._runner
}
const factory = this._runnerFactory || createServerModuleRunner
this._runner = factory(this, this._runnerOptions)
return this._runner
}
override async close(): Promise<void> {
await super.close()
if (this._runner) {
await this._runner.close()
}
}
}
Domain
Source
Frequently Asked Questions
What is the RunnableDevEnvironment class?
RunnableDevEnvironment is a class in the vite codebase, defined in packages/vite/src/node/server/environments/runnableEnvironment.ts.
Where is RunnableDevEnvironment defined?
RunnableDevEnvironment is defined in packages/vite/src/node/server/environments/runnableEnvironment.ts at line 43.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free