Skip to content

Commit

Permalink
chore: retire macro
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Oct 14, 2023
1 parent 96ac8f5 commit f36d0ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions sections/api/primary/css-prop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Note that you don't even have to add the import, the Babel plugin does that auto

#### Usage with the Babel macro

> This functionality was removed in v6.1 due to lack of usage and unnecessary bloat for other consumers.
You can use the [Babel macro](/docs/tooling#babel-macro) to make this work in `create-react-app`. Unfortunately, Babel macros only run when imported so **the import can not be added automatically.** The above code works perfectly if you add the import to the macro manually:

```tsx
Expand Down
4 changes: 0 additions & 4 deletions sections/faqs/create-react-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@
The basic functionality of the library should work out of the box like any other library.

However, if you want to do server-side rendering or take advantage of some of the advanced capabilities of the [styled-components babel plugin](/docs/tooling#babel-plugin) without ejecting you'll need to set up [`react-app-rewired`](https://github.com/timarney/react-app-rewired) and [`react-app-rewire-styled-components`](https://github.com/withspectrum/react-app-rewire-styled-components).

### Babel Macro

As of create-react-app v2, there is now an alternative to setting up `react-app-rewired` through use of "babel macros". See the [documentation for the styled-components babel macro](/docs/tooling#babel-macro) for setup and usage.
4 changes: 3 additions & 1 deletion sections/tooling/babel-macro.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Babel Macro | v4
## Babel Macro | v4 | v5

> This functionality was removed in v6.1 due to lack of usage and unnecessary bloat for other consumers.
[Babel macros](https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros) are quickly gaining steam as a full-featured option to allow advanced code transpilation for zero-config projects like [create-react-app](https://github.com/facebook/create-react-app).

Expand Down

0 comments on commit f36d0ce

Please sign in to comment.