From 38806cd895f0f1f66d3f108a145adcb3b8696e34 Mon Sep 17 00:00:00 2001 From: Daniel Schlabach <31226559+dschlabach@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:20:46 -0500 Subject: [PATCH] fix: improve dev server watching configuration (#1621) --- package.json | 2 +- tsup.config.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index be64781475..309448dd4a 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "ci:format": "biome ci --linter-enabled=false --organize-imports-enabled=false", "ci:lint": "biome ci --formatter-enabled=false --organize-imports-enabled=false", "cp": "cp -R src site/docs/pages", - "dev:watch": "concurrently \"tailwind -i ./src/styles/index-with-tailwind.css -o ./src/styles.css --watch\" \"tsup --watch ./src/**/*.tsx\"", + "dev:watch": "concurrently \"tailwind -i ./src/styles/index-with-tailwind.css -o ./src/styles.css --watch\" \"tsup\"", "format": "biome format --write .", "lint": "biome lint --write .", "lint:unsafe": "biome lint --write --unsafe .", diff --git a/tsup.config.ts b/tsup.config.ts index f10a21f71d..42839a9679 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -4,6 +4,9 @@ import { defineConfig } from 'tsup'; export default defineConfig({ entry: ['src/**/index.ts', 'src/**/theme.ts', 'src/**/styles.css'], + ignoreWatch: ['**/*.test.ts', '**/*.test.tsx', '**/*.stories.tsx'], + // TODO: update this based on environment, once we switch to tsup for builds + watch: ['src/**/*.{ts,tsx}'], format: 'esm', minify: false, // Disable minification during development splitting: true, // Enable code splitting to properly handle React contexts