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

React: Lazy import react-docgen-typescript-plugin #23019

Merged
merged 3 commits into from
Jun 13, 2023
Merged

Conversation

tmeasday
Copy link
Member

This can take up to a second on my machine (it has a dependency on typescript), and is totally wasted effort if we are not using the plugin.

What I did

Just use an await import to import when needed.

We might look at what other "optional" presets are doing similar things.

How to test

Let's check docgen still works OK on some react projects. I think that should be covered by the CI tests.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

This can take up to a second on my machine (it has a dependency on `typescript`), and is totally wasted effort if we are not using the plugin.
@tmeasday tmeasday added performance issue ci:daily Run the CI jobs that normally run in the daily job. labels Jun 10, 2023
@tmeasday tmeasday requested review from shilman and ndelangen June 10, 2023 00:07
@shilman shilman changed the title Don't always import react-docgen-typescript-plugin. Reat: Don't always import react-docgen-typescript-plugin Jun 10, 2023
@shilman shilman changed the title Reat: Don't always import react-docgen-typescript-plugin React: Lazy import react-docgen-typescript-plugin Jun 10, 2023
@shilman shilman added react maintenance User-facing maintenance tasks and removed ci:daily Run the CI jobs that normally run in the daily job. labels Jun 10, 2023
@ndelangen ndelangen self-assigned this Jun 12, 2023
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Looks great and @ndelangen 's fix seems to work! 🚀

@shilman shilman merged commit 7d3d2c4 into next Jun 13, 2023
@shilman shilman deleted the tom/wait-to-import-rdtp branch June 13, 2023 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks performance issue react
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants