FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

add experimental babel-plugin-macros support by kentcdodds · Pull Request #3675 · react/create-react-app · GitHub

add experimental babel-plugin-macros support - #3675

Merged
gaearon merged 2 commits into
react:nextfrom
kentcdodds:pr/add-babel-plugin-macros
Jan 9, 2018
Merged

add experimental babel-plugin-macros support#3675
gaearon merged 2 commits into
react:nextfrom
kentcdodds:pr/add-babel-plugin-macros

Conversation

kentcdodds commented Jan 2, 2018
edited
Loading

Copy link
Copy Markdown
Contributor

closes #2730

This will remain undocumented until the brave have tried it in the wild.

Test Plan:

There's currently no established way to test changes to
babel-preset-react-app. But I did create unmaintained-react-scripts-babel-macros a while back and it worked well.

closes react#2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](react#2730 (comment))
and it worked well.

kentcdodds commented Jan 2, 2018
edited
Loading

Copy link
Copy Markdown
Contributor Author

Copied from the linked issue:

Ok, so, check this out:

unmaintained-react-scripts-babel-macros diff:

(this would be implemented as part of babel-preset-react-app if it becomes official)

App.js

npm test

npm start

So that's pretty rock solid awesome... 😄

Note: that was before the babel-macros -> babel-plugin-macros name change which I did to improve the compatibility with babel 7. There have been no breaking changes other than the name change since I created unmaintained-react-scripts-babel-macros 👍

Timer added this to the 2.0.0 milestone Jan 3, 2018

omeid commented Jan 3, 2018

Copy link
Copy Markdown

I understand that it is a massive change but any chance this could land "unsupported" without having to wait for 2.0? Landing it would allow a lot of people to test this actually out in the wild and promote adding macros support to various babel plugins.

gaearon changed the base branch from master to next January 9, 2018 16:53
gaearon merged commit bfffb26 into react:next Jan 9, 2018

gaearon commented Jan 9, 2018

Copy link
Copy Markdown
Contributor

Merged into next.

kentcdodds deleted the pr/add-babel-plugin-macros branch January 9, 2018 17:29
gaearon pushed a commit that referenced this pull request Jan 9, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
gaearon pushed a commit that referenced this pull request Jan 10, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
Timer pushed a commit to Timer/create-react-app that referenced this pull request Jan 11, 2018
* add experimental babel-plugin-macros support

closes react#2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](react#2730 (comment))
and it worked well.

* Pin the version
Timer pushed a commit that referenced this pull request Jan 11, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
Timer pushed a commit to Timer/create-react-app that referenced this pull request Jan 11, 2018
* add experimental babel-plugin-macros support

closes react#2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](react#2730 (comment))
and it worked well.

* Pin the version
Timer pushed a commit to Timer/create-react-app that referenced this pull request Jan 13, 2018
* add experimental babel-plugin-macros support

closes react#2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](react#2730 (comment))
and it worked well.

* Pin the version
gaearon pushed a commit that referenced this pull request Jan 13, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
Timer pushed a commit that referenced this pull request Jan 14, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
gaearon pushed a commit that referenced this pull request Jan 14, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
gaearon pushed a commit that referenced this pull request Jan 14, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
gaearon pushed a commit that referenced this pull request Jan 14, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
gaearon pushed a commit that referenced this pull request Jan 14, 2018
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](#2730 (comment))
and it worked well.

* Pin the version
Timer pushed a commit to Timer/create-react-app that referenced this pull request Jan 15, 2018
* add experimental babel-plugin-macros support

closes react#2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](react#2730 (comment))
and it worked well.

* Pin the version

Timer commented Jan 18, 2018

Copy link
Copy Markdown
Contributor

Support for this has been released in the first v2 alpha version. See #3815 for more details!

gaearon mentioned this pull request Jan 18, 2018
vinhlh mentioned this pull request Feb 13, 2018
akstuhl pushed a commit to akstuhl/create-react-app that referenced this pull request Mar 15, 2018
* add experimental babel-plugin-macros support

closes react#2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](react#2730 (comment))
and it worked well.

* Pin the version

gaearon commented Oct 2, 2018

Copy link
Copy Markdown
Contributor

It shipped in 2.0.
https://reactjs.org/blog/2018/10/01/create-react-app-v2.html

Copy link
Copy Markdown
Contributor Author

This is just awesome! 🎉

such commented Oct 2, 2018

Copy link
Copy Markdown

Do you have to eject to make it work?
I've just tried it and I get Error: Cannot find module 'babel-macros'
I tried adding babel-macros and babel-plugin-macros as dependency with no luck...

Copy link
Copy Markdown
Contributor Author

You're probably trying to use an outdated macro. What are you trying to use?

such commented Oct 2, 2018

Copy link
Copy Markdown

I'm trying to use https://github.com/leoasis/graphql-tag.macro

Copy link
Copy Markdown
Contributor Author

Yeah, that needs to be updated to babel-plugin-macros: https://github.com/leoasis/graphql-tag.macro/blob/47919df7548bd698076cb74fa777874a49bc9bbe/package.json#L20

Luckily the upgrade is pretty simple. Pretty much find/replace babel-macros for babel-plugin-macros.

such commented Oct 3, 2018

Copy link
Copy Markdown

ok thanks!

lock Bot locked and limited conversation to collaborators Jan 18, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to 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.

6 participants


Back | FazBrowse Home | New Git URL