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

Function externalizeDepsInWatchPlugin

packages/vite/rolldown.config.ts:199–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197}
198
199function externalizeDepsInWatchPlugin(): Plugin {
200 return {
201 name: 'externalize-deps-in-watch',
202 options(options) {
203 if (this.meta.watchMode) {
204 options.external ||= []
205 if (!Array.isArray(options.external))
206 throw new Error('external must be an array')
207 options.external = options.external.concat(
208 Object.keys(pkg.devDependencies),
209 )
210 }
211 },
212 }
213}
214
215interface ShimOptions {
216 src?: string

Callers 1

rolldown.config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected