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

Simpify babel config slightly #2593

Merged
merged 1 commit into from Mar 9, 2023
Merged

Simpify babel config slightly #2593

merged 1 commit into from Mar 9, 2023

Conversation

BPScott
Copy link
Member

@BPScott BPScott commented Mar 9, 2023

Description

This moves preset-env plugins to be included as part of the preset-env pass rather than separately - which is now possible because we've dropped decorator support.

This does produce some slight output changes in production builds - mostly removing cases where class properties were needlessly initialized.

To test

Compare build output to previous builds:

  • Check out the main branch of quilt in your ~/projects/quilt directory and run yarn, yarn clean && yarn build to produce a clean build
  • Check out this branch of quilt in your ~/src/github.com/Shopify/quilt directory and run yarn, yarn clean && yarn build to produce a clean build
  • Run for PACKAGENAME in $(ls -1 packages); diff -ru ~/projects/quilt/packages/$PACKAGENAME packages/$PACKAGENAME -x '*.tsbuildinfo' -x '*.d.ts.map' to compare the build folder output.
    • Note that the differences are due to removed initializations to void 0 for class properties. In the majority of these cases the property was set to be a defined value shortly below the removed line.

This moves preset-env plugins to be included as part of the preset-env
pass rather than separatly - which is now possible because we've dropped
decorator support.

This does produce some output changes in production builds - mostly
removing cases where class properties were needlessly initialize to
undefined.
@BPScott BPScott requested a review from a team as a code owner March 9, 2023 00:50
@BPScott BPScott requested a review from royleejr March 9, 2023 00:50
@BPScott BPScott merged commit 2f731db into main Mar 9, 2023
@BPScott BPScott deleted the babel-simplify branch March 9, 2023 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant