dillon1000/react

Commit

[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.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-refresh/src/ReactFreshBabelPlugin.js ModifiedM packages/react-refresh/src/__tests__/__snapshots__/ReactFreshBabelPlugin-test.js.snap Modified
Patch

Files changed

Rendering syntax-highlighted changes…