From 411e87cadbeee03c48ffc35b677cfd4c2edcd13b Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Wed, 22 Sep 2021 18:33:04 +0200 Subject: [PATCH] fix(watch): skip on build index.css changes --- src/index.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 07a5eae..cbbc0c3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,8 +10,6 @@ import { name, version } from '../package.json' import type { Awaited } from 'ts-essentials' import type { Options, NormalizedOptions } from './types' -const outFile = 'index.js' - export async function runViteBuild(options: NormalizedOptions) { let result: Awaited> | undefined @@ -25,7 +23,7 @@ export async function runViteBuild(options: NormalizedOptions) { entry: resolve(currentDir, options.entry), formats: ['iife'], name: 'kirbyupExport', - fileName: () => outFile + fileName: () => 'index.js' }, minify: !options.watch, outDir: currentDir, @@ -89,8 +87,8 @@ export async function build(_options: Options) { const ignored = [ '**/{.git,node_modules}/**', - // Always ignore out file - outFile + // Always ignore out files + 'index.{css,js}' ] const watchPaths =