From dfa8f2c5be3c774d81a81788f591817753fce4c2 Mon Sep 17 00:00:00 2001 From: Jade Ellis Date: Tue, 23 Jul 2024 20:27:32 +0100 Subject: [PATCH] Fix wrong-way-round conditional --- packages/vite-plugin-thumbhash-svg/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vite-plugin-thumbhash-svg/src/index.ts b/packages/vite-plugin-thumbhash-svg/src/index.ts index 2fbd0234..0d17fe9b 100644 --- a/packages/vite-plugin-thumbhash-svg/src/index.ts +++ b/packages/vite-plugin-thumbhash-svg/src/index.ts @@ -168,7 +168,7 @@ const thumbHash = (options: Options = {}): Plugin => { if (cache.has(id)) { let loadedSource = cache.get(id) as importItem - if (config.command === 'serve') { + if (config.command !== 'serve') { const originalRefId = this.emitFile({ type: 'asset', name: basename(cleanedId), @@ -211,7 +211,7 @@ const thumbHash = (options: Options = {}): Plugin => { cache.set(id, loadedSource) - if (config.command === 'serve') { + if (config.command !== 'serve') { const originalRefId = this.emitFile({ type: 'asset', name: basename(cleanedId),