Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9cbe4bf

Browse files
Kent C. Doddsgaearon
Kent C. Dodds
authored andcommittedJan 14, 2018
add experimental babel-plugin-macros support (#3675)
* 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
1 parent 113b722 commit 9cbe4bf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
 

‎packages/babel-preset-react-app/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
'use strict';
88

99
const plugins = [
10+
// Experimental macros support. Will be documented after it's had some time
11+
// in the wild.
12+
require.resolve('babel-plugin-macros'),
1013
// class { handleClick = () => { } }
1114
require.resolve('babel-plugin-transform-class-properties'),
1215
// The following two plugins use Object.assign directly, instead of Babel's

‎packages/babel-preset-react-app/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
],
1313
"dependencies": {
1414
"babel-plugin-dynamic-import-node": "1.1.0",
15+
"babel-plugin-macros": "2.0.0",
1516
"babel-plugin-syntax-dynamic-import": "6.18.0",
1617
"babel-plugin-transform-class-properties": "6.24.1",
1718
"babel-plugin-transform-object-rest-spread": "6.26.0",

0 commit comments

Comments
 (0)
Please sign in to comment.