From 313634424fa0c2e1d709b25aa6d7ca1cd238c6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sun, 19 Jul 2020 20:06:04 +0100 Subject: [PATCH] fix(ui): exclude storybook stories from typescript builds --- ui/.storybook/config.js | 2 +- ui/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/.storybook/config.js b/ui/.storybook/config.js index 0993ce46e..d4191e2e7 100644 --- a/ui/.storybook/config.js +++ b/ui/.storybook/config.js @@ -72,7 +72,7 @@ addDecorator((story) => { ); }); -const req = require.context("../src/Components", true, /\.stories\.(js|tsx)$/); +const req = require.context("../src/Components", true, /\.stories\.tsx$/); function loadStories() { req.keys().forEach((filename) => req(filename)); diff --git a/ui/tsconfig.json b/ui/tsconfig.json index 2b99637ee..b87fd9031 100644 --- a/ui/tsconfig.json +++ b/ui/tsconfig.json @@ -16,5 +16,6 @@ "noEmit": true, "jsx": "react" }, - "include": ["src"] + "include": ["src"], + "exclude": ["**/*.stories.tsx"] }