dillon1000/react
Commit
Browse files [react-refresh/babel] Always insert registrations after var (#18794)
Previously, we transformed ``` let Foo = styled.div``; ``` to ``` let Foo = _c1 = styled.div``; ``` and then babel-plugin-styled-components would infer `_c1` as the display name. Widen the existing case that applies to function expressions to apply to any type of variable declaration.
Changed paths2 files
First-parent comparisonpackages/react-refresh/src/ReactFreshBabelPlugin.js ModifiedM packages/react-refresh/src/__tests__/__snapshots__/ReactFreshBabelPlugin-test.js.snap ModifiedPatch
Files changed
Rendering syntax-highlighted changes…