Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cra): move to react-docgen-typescript-plugin #149

Merged
merged 1 commit into from
Jun 16, 2020

Conversation

mrmckeb
Copy link
Member

@mrmckeb mrmckeb commented Jun 15, 2020

This updates the CRA preset to mirror the config as of #11106.

@mrmckeb mrmckeb added enhancement New feature or request create-react-app labels Jun 15, 2020
@@ -58,7 +58,7 @@
"husky": "^4.2.3",
"jest": "24.9.0",
"lint-staged": "^10.0.8",
"prettier": "^1.19.1",
"prettier": "^2.0.5",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for use with import type....

!typescriptOptions ||
// NOTE: These are set by default in Storybook 6.
const {
typescriptOptions = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we somehow keep this in sync with Storybook defaults? If I understand this code, adding adefault for reactDocgen "fixes the bug", but the reactDocgenTypescriptOptions are still out of sync with Storybook's:

https://github.com/storybookjs/storybook/blob/next/lib/core/src/server/config/defaults.js#L4-L7

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These actually should already come through in Storybook v6 - so this is only for older Storybook versions. This default above would only occur if we didn't receive the defaults from Storybook.

@mrmckeb mrmckeb force-pushed the feature/cra-ts-plugin branch 2 times, most recently from 8b9620b to 00846be Compare June 15, 2020 09:48
const {
typescriptOptions = {
reactDocgen: 'react-docgen-typescript',
reactDocgenTypescriptOptions: {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need to add the extra options here?

@mrmckeb mrmckeb force-pushed the feature/cra-ts-plugin branch 7 times, most recently from 0d14c46 to d6d815d Compare June 15, 2020 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-react-app enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants