From 214ec1f87fa3033c7b38e3c25f36739631a91b55 Mon Sep 17 00:00:00 2001 From: Seb-sti1 <65665540+seb-sti1@users.noreply.github.com> Date: Thu, 19 Oct 2023 14:14:30 +0200 Subject: [PATCH] Styleguide: deactivate cache and use tsconfig.json --- frontend/styleguide.config.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/frontend/styleguide.config.js b/frontend/styleguide.config.js index 1776b7cb..f5791363 100644 --- a/frontend/styleguide.config.js +++ b/frontend/styleguide.config.js @@ -1,8 +1,18 @@ +const webpackConfig = require('react-scripts/config/webpack.config.js'); + module.exports = { - propsParser: require('react-docgen-typescript').withDefaultConfig({ - skipChildrenPropWithoutDoc: false, - }).parse, + title: 'Frontend Components', + propsParser: require('react-docgen-typescript').withCustomConfig( + `${process.cwd()}/tsconfig.json`, + { + skipChildrenPropWithoutDoc: false, + }, + ).parse, components: ['src/App.tsx', 'src/Components/**/*.{tsx,jsx,js,ts}'], + webpackConfig: { + ...webpackConfig(process.env.NODE_ENV), + cache: false, // DON'T REMOVE THIS!!!!!! + }, ignore: [ '**/__tests__/**', '**/*.test.{js,jsx,ts,tsx}',