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

Remove extra files from build #1888

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Remove extra files from build #1888

merged 2 commits into from
Oct 9, 2023

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Sep 29, 2023

Closes #1876

Summary

wp-scripts automatically gathers all .json files and puts them inside each build.

Reference: https://github.com/WordPress/gutenberg/blob/1fb1343c42a59d5062660a7da20a4bff4d06e369/packages/scripts/config/webpack.config.js#L263-L313

ℹ️ By using the already existing FIleManager in our setup, we can delete the extra file generated.

Screenshots

Output of tree build -d

After change:

build
├── animation
│   └── images
├── blocks
│   ├── about-author
│   ├── accordion
│   ├── accordion-item
│   ├── advanced-column
│   ├── advanced-columns
│   ├── advanced-heading
│   ├── button
│   ├── button-group
│   ├── circle-counter
│   ├── content-generator
│   ├── countdown
│   ├── flip
│   ├── font-awesome-icons
│   ├── form
│   ├── form-file
│   ├── form-hidden-field
│   ├── form-input
│   ├── form-multiple-choice
│   ├── form-nonce
│   ├── form-stripe-field
│   ├── form-textarea
│   ├── google-map
│   ├── icon-list
│   ├── icon-list-item
│   ├── leaflet-map
│   ├── lottie
│   ├── plugin-cards
│   ├── popup
│   ├── posts-grid
│   ├── pricing
│   ├── progress-bar
│   ├── review
│   ├── service
│   ├── sharing-icons
│   ├── slider
│   ├── stripe-checkout
│   ├── tabs
│   ├── tabs-item
│   └── testimonials
├── css
├── dashboard
├── export-import
└── pro
    ├── add-to-cart-button
    ├── business-hours
    ├── business-hours-item
    ├── product-add-to-cart
    ├── product-images
    ├── product-meta
    ├── product-price
    ├── product-rating
    ├── product-related-products
    ├── product-short-description
    ├── product-stock
    ├── product-tabs
    ├── product-title
    ├── product-upsells
    ├── review-comparison
    └── woo-comparison

63 directories

Before the change, the number was 471 directories (you can see here the structure), now we have 63 directories


Test instructions

Make sure that the build is valid since we deleted some extra files from the it.


Checklist before the final review

  • Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Sep 29, 2023
@Soare-Robert-Daniel Soare-Robert-Daniel linked an issue Sep 29, 2023 that may be closed by this pull request
@Soare-Robert-Daniel Soare-Robert-Daniel added the pr-checklist-skip Allow this Pull Request to skip checklist. label Sep 29, 2023
@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review September 29, 2023 09:10
@pirate-bot
Copy link
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 274.81 KB 274.81 KB 0 B (0.00%)
Blocks 1.47 MB 1.47 MB 0 B (0.00%)
CSS 89.3 KB 89.3 KB 0 B (0.00%)
Dashboard 131.23 KB 131.23 KB 0 B (0.00%)
Export Import 87.19 KB 87.19 KB 0 B (0.00%)
Pro 346.75 KB 346.75 KB 0 B (0.00%)

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Sep 29, 2023
@pirate-bot
Copy link
Contributor

pirate-bot commented Sep 29, 2023

Plugin build for 8d14c42 is ready 🛎️!

@pirate-bot
Copy link
Contributor

pirate-bot commented Sep 29, 2023

E2E Summary

Typing

Test Average Time (ms) Standard Deviation (ms) Median Time (ms) Quantile for soft limit (%) Quantile for hard limit (%)
Typing 76.35 13.83 75.16 5.26 (60ms) 63.16 (80ms)
Values above 60ms "0 - 64.32, 1 - 66.20, 2 - 102.26, 4 - 64.27, 5 - 75.16, 6 - 60.02, 7 - 74.17, 8 - 70.03, 9 - 80.40, 10 - 109.17, 11 - 82.04, 12 - 70.00, 13 - 77.80, 14 - 76.82, 15 - 81.39, 16 - 92.35, 17 - 86.37, 18 - 65.92"

Copy link
Member

@HardeepAsrani HardeepAsrani left a comment

Choose a reason for hiding this comment

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

@Soare-Robert-Daniel This is fine too but can we try to see why this is happening in the first place and try to make sure the files aren't copied?

@HardeepAsrani HardeepAsrani self-requested a review September 29, 2023 23:07
@irinelenache
Copy link
Contributor

@Soare-Robert-Daniel Tested and everything's fine here 🚀

@HardeepAsrani HardeepAsrani merged commit 83eddd8 into development Oct 9, 2023
11 checks passed
@HardeepAsrani HardeepAsrani deleted the fix/css-deploy branch October 9, 2023 10:12
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 2.4.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove block files from Blocks CSS/Animation
4 participants