Closed dubzzz closed 1 year ago
Following my change, I checked that react-ts
is still passing:
yarn storybook
🟢 yarn build-storybook
🟢 yarn preview-storybook
🟢 And before it:
yarn storybook
🟢 yarn build-storybook
🟢 yarn preview-storybook
🟢 For more context, in my case I got the following presets (output of await presets.apply('typescript', {})
):
{
"check": false,
"reactDocgen": "react-docgen-typescript",
"reactDocgenTypescriptOptions": {
"shouldExtractLiteralValuesFromEnum": true,
"shouldRemoveUndefinedFromOptional": true,
"savePropValueAsString": true
}
}
Which seems to be the default for https://github.com/storybookjs/storybook/blob/bd23a5abff9daadc85d6bd081dda082f01a82fbd/code/lib/core-server/src/presets/common-preset.ts#L46
I think I can close the issue. Actually the error came from the fact that our internal configuration was doing nasty things on plugins. So not related to this repository at all. The 0.2.1 just highlighted a bug on my side.
Sorry for the useless ping
While bumping one project from v0.2.0 to v0.2.1, I experienced errors like:
By looking into the diff between these two versions I found the following line change: https://github.com/storybookjs/builder-vite/compare/v0.2.0...v0.2.1#diff-1897e37c00f0a892e59db90901f310d352427ba2bd39472789bbd91a1e48c8efR183. Actually while in the past we either push-ed or unshift-ed, we now push and unshift as soon as the docgen has been defined to
react-docgen-typescript
.The change seem to be related to https://github.com/storybookjs/builder-vite/commit/26e66474b42c6e7e4c98c3cba2a05bfd5805f6eb in which
} else if (reactDocgen) {
got replaced byif (typeof reactDocgenOption === 'string') {
.I locally changed the if by else if and dropped the error on my local version. But there might be a real need for this if without a else...?