Open k35o opened 7 months ago
Changing to this part would make it typesafe.
if (imageRule && imageRule !== '...') {
imageRule['exclude'] = /\.svg$/;
}
However, I don't know a good moulding for this part(Now it is misguided by any
.).
const imageRule = config.module.rules.find((rule: any) => rule?.['test']?.test('.svg'));
Describe the bug
If configured according to this section of the documentation, TypeScript error occurs at this point.
Details of the error are as follows.
To Reproduce
https://stackblitz.com/edit/github-akhmer?file=.storybook%2Fpreview.ts
System
Additional context
Do
npx create-next-app@latest
, donpx storybook@latest init
, include.storybook/*.ts
to tsconfig, then reproduce.