MCPcopy
hub / github.com/vitejs/vite / DevEnvironment

Class DevEnvironment

packages/vite/src/node/server/environment.ts:55–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55export class DevEnvironment extends BaseEnvironment {
56 mode = 'dev' as const
57 moduleGraph: EnvironmentModuleGraph
58
59 depsOptimizer?: DepsOptimizer
60 /**
61 * @internal
62 */
63 _remoteRunnerOptions: DevEnvironmentContext['remoteRunner']
64 /**
65 * @internal
66 */
67 _skipFsCheck: boolean
68
69 get pluginContainer(): EnvironmentPluginContainer<DevEnvironment> {
70 if (!this._pluginContainer)
71 throw new Error(
72 `${this.name} environment.pluginContainer called before initialized`,
73 )
74 return this._pluginContainer
75 }
76 /**
77 * @internal
78 */
79 _pluginContainer: EnvironmentPluginContainer<DevEnvironment> | undefined
80
81 /**
82 * @internal
83 */
84 _closing: boolean = false
85 /**
86 * @internal
87 */
88 _pendingRequests: Map<
89 string,
90 {
91 request: Promise<TransformResult | null>
92 timestamp: number
93 abort: () => void
94 }
95 >
96 /**
97 * @internal
98 */
99 _crawlEndFinder: CrawlEndFinder
100
101 /**
102 * Hot channel for this environment. If not provided or disabled,
103 * it will be a noop channel that does nothing.
104 *
105 * @example
106 * environment.hot.send({ type: 'full-reload' })
107 */
108 hot: NormalizedHotChannel
109
110 public bundledDev?: BundledDev
111
112 constructor(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected