Skip to content

Commit

Permalink
chore: delete unused plugin hook 'watchChange' (#4617)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyf0 committed Sep 10, 2021
1 parent f19282f commit e623b4a
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/vite/src/node/server/pluginContainer.ts
Expand Up @@ -38,7 +38,6 @@ import {
OutputOptions,
ModuleInfo,
NormalizedInputOptions,
ChangeEvent,
PartialResolvedId,
ResolvedId,
PluginContext as RollupPluginContext,
Expand Down Expand Up @@ -82,7 +81,6 @@ export interface PluginContainerOptions {
export interface PluginContainer {
options: InputOptions
buildStart(options: InputOptions): Promise<void>
watchChange(id: string, event?: ChangeEvent): void
resolveId(
id: string,
importer?: string,
Expand Down Expand Up @@ -531,17 +529,6 @@ export async function createPluginContainer(
}
},

watchChange(id, event = 'update') {
const ctx = new Context()
if (watchFiles.has(id)) {
for (const plugin of plugins) {
if (!plugin.watchChange) continue
ctx._activePlugin = plugin
plugin.watchChange.call(ctx as any, id, { event })
}
}
},

async close() {
if (closed) return
const ctx = new Context()
Expand Down

0 comments on commit e623b4a

Please sign in to comment.