From 495ce5da232d832d83c91b9b7bf42496ed4f954b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Wed, 13 Oct 2021 13:42:58 +0800 Subject: [PATCH] fix: typo (#178) --- src/core/context.ts | 4 ++-- src/core/unplugin.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)