From e4c2e0ef1d9f55c879cb4aa50fe59d04fa3463c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kry=C5=A1p=C3=ADn?= Date: Thu, 29 Feb 2024 11:52:34 -0500 Subject: [PATCH] Chore(web-react): Do not list components that don't have index.html on Demo homepage #DS-1185 Remove manually controlled list. --- packages/web-react/config/vite/app.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/web-react/config/vite/app.ts b/packages/web-react/config/vite/app.ts index f2c0469937..a5c0954a2b 100644 --- a/packages/web-react/config/vite/app.ts +++ b/packages/web-react/config/vite/app.ts @@ -6,8 +6,6 @@ import { defineConfig } from 'vite'; import handlebars from 'vite-plugin-handlebars'; import { getNestedDirs } from '../../scripts/build'; -const hiddenDemoComponents = ['Field', 'Dialog', 'Icon', 'NoSsr', 'TextFieldBase', 'VisuallyHidden']; - export default defineConfig({ // Disable HMR overlay to avoid flaky screenshots in visual regression tests server: { @@ -29,7 +27,7 @@ export default defineConfig({ components: [ ...readdirSync('src/components', { withFileTypes: true }) .filter((item) => item.isDirectory()) - .filter((item) => !hiddenDemoComponents.includes(item.name)) + .filter((item) => readdirSync(`src/components/${item.name}`).includes('index.html')) .map((item) => item.name), ], },