Skip to content

cleanup @babel/plugin-transform-destructuring configuration - #8215

Closed
henryqdineen wants to merge 2 commits into
react:masterfrom
henryqdineen:fix-destructuring-plugin-config
Closed

cleanup @babel/plugin-transform-destructuring configuration#8215
henryqdineen wants to merge 2 commits into
react:masterfrom
henryqdineen:fix-destructuring-plugin-config

Conversation

@henryqdineen

@henryqdineenhenryqdineen commented Dec 20, 2019

Copy link
Copy Markdown
Contributor

The @babel/plugin-transform-destructuring Babel plugin does not have a selectiveLooseoption currently and this code has been a source of confusion for me and possibly others. It was introduced in #5997 and I'm not sure if the intention was to wait for the selectiveLoose option to be available. Even if this worked as hoped for I think that only useState and useReducer should be targeted for this optimization.

Thanks! Please let me know if I'm missing something obvious.

@henryqdineenhenryqdineen changed the title remove usage of non-existent selectiveLoosecleanup @babel/plugin-transform-destructuring configurationDec 20, 2019
@sumanbh

Copy link
Copy Markdown

I think selectiveLoose option relies on this PR on babel which hasn't been merged yet.

@henryqdineen

Copy link
Copy Markdown
ContributorAuthor

Yep. I noticed that PR and don't see any activity on it.

@stale

staleBot commented Jan 22, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stalestaleBot added the stale label Jan 22, 2020
@henryqdineen

Copy link
Copy Markdown
ContributorAuthor

I noticed it was marked as stale. I still think this is a valid PR.

@ianschmitz

ianschmitz commented Jan 23, 2020

Copy link
Copy Markdown
Contributor

If we decided to get rid of the customization, we can remove the plugin entirely as it's provided by preset-env.

@ianschmitzianschmitz added this to the 3.x milestone Jan 30, 2020
@ianschmitz

Copy link
Copy Markdown
Contributor

Thanks for bringing this to our attention! I took a slightly different approach in #8353, and removed it entirely.

I included you as a co-author so you get credit as well 👍

@henryqdineen

Copy link
Copy Markdown
ContributorAuthor

thanks @ianschmitz!

@locklockBot locked and limited conversation to collaborators Feb 5, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@henryqdineen@sumanbh@ianschmitz@facebook-github-bot