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

RNW-Vite: Fix flow plugin including too many things #29952

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

dannyhw
Copy link
Member

@dannyhw dannyhw commented Dec 8, 2024

Closes #

What I did

Excludes all node modules except for react native packages which are actually causing the issue.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-29952-sha-41e4fd31. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-29952-sha-41e4fd31
Triggered by @shilman
Repository storybookjs/storybook
Branch danny/fix-rnw-flow-plugin-excludes
Commit 41e4fd31
Datetime Sun Dec 8 15:24:58 UTC 2024 (1733671498)
Workflow run 12223000941

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=29952

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.7 MB 77.7 MB 0 B -1.09 0%
initSize 130 MB 130 MB 0 B 1.98 0%
diffSize 52.7 MB 52.7 MB 0 B 1.98 0%
buildSize 6.87 MB 6.87 MB 0 B 2 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B - 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B 1.16 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.57 MB 3.57 MB 0 B 1.16 0%
buildPreviewSize 3.3 MB 3.3 MB 0 B 2 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 6.4s 19.1s 12.7s 1.02 66.5%
generateTime 18.2s 19.2s 1s -0.7 5.3%
initTime 11.6s 13.7s 2.1s 0.13 15.5%
buildTime 8.8s 8.8s -15ms -0.24 -0.2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6s 4.6s -1s -400ms -0.66 -30.3%
devManagerResponsive 4s 3.3s -682ms -0.71 -20.3%
devManagerHeaderVisible 646ms 488ms -158ms -0.95 -32.4%
devManagerIndexVisible 718ms 518ms -200ms -1.2 -38.6%
devStoryVisibleUncached 1.3s 1.7s 449ms 0.14 25.4%
devStoryVisible 719ms 518ms -201ms -1.09 -38.8%
devAutodocsVisible 570ms 485ms -85ms -0.57 -17.5%
devMDXVisible 425ms 433ms 8ms -0.82 1.8%
buildManagerHeaderVisible 629ms 508ms -121ms -0.68 -23.8%
buildManagerIndexVisible 708ms 604ms -104ms -0.47 -17.2%
buildStoryVisible 571ms 467ms -104ms -0.66 -22.3%
buildAutodocsVisible 456ms 415ms -41ms -0.46 -9.9%
buildMDXVisible 494ms 386ms -108ms -0.91 -28%

Greptile Summary

Updates the Flow plugin configuration in React Native Web Vite preset to optimize build performance by limiting Flow processing to only React Native related files.

  • Modified exclude pattern in code/frameworks/react-native-web-vite/src/preset.ts to /node_modules\/(?!react-native|@react-native)/
  • Added Flow plugin configuration to process only .flow and .jsx files through esbuild
  • Configured React plugin with automatic JSX runtime and disabled babel configuration files
  • Maintained proper extension resolution order prioritizing .web.* files

💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@dannyhw dannyhw added ci:normal maintenance User-facing maintenance tasks labels Dec 8, 2024
Copy link

nx-cloud bot commented Dec 8, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 41e4fd3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@shilman shilman changed the title RNW Vite: Fix flow plugin including too many things RNW-Vite: Fix flow plugin including too many things Dec 8, 2024
@dannyhw
Copy link
Member Author

dannyhw commented Dec 8, 2024

tested from the canary, looks to work

@shilman shilman merged commit c9d3cbb into next Dec 9, 2024
69 of 74 checks passed
@shilman shilman deleted the danny/fix-rnw-flow-plugin-excludes branch December 9, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants