diff --git a/src/core/context.ts b/src/core/context.ts index 63ca7a6d..dad5faf8 100644 --- a/src/core/context.ts +++ b/src/core/context.ts @@ -66,10 +66,10 @@ export class Context { return this._server = server - this.setupWather(server.watcher) + this.setupWatcher(server.watcher) } - setupWather(watcher: fs.FSWatcher) { + setupWatcher(watcher: fs.FSWatcher) { const { globs } = this.options watcher diff --git a/src/core/unplugin.ts b/src/core/unplugin.ts index 04bc76c2..e7752ea9 100644 --- a/src/core/unplugin.ts +++ b/src/core/unplugin.ts @@ -47,7 +47,7 @@ export default createUnplugin((options = {}) => { } if (config.build.watch && config.command === 'build') - ctx.setupWather(chokidar.watch(ctx.options.globs)) + ctx.setupWatcher(chokidar.watch(ctx.options.globs)) }, configureServer(server) { ctx.setupViteServer(server)