Skip to content

Commit 9666b83

Browse files
porfirioribeiroKyleAMathews
authored andcommitted
Add babel-plugin-macros (#7129)
1 parent d26369b commit 9666b83

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

packages/gatsby/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"babel-loader": "8.0.0-beta.4",
3131
"babel-plugin-add-module-exports": "^0.2.1",
3232
"babel-plugin-dynamic-import-node": "^1.2.0",
33+
"babel-plugin-macros": "^2.4.0",
3334
"babel-plugin-remove-graphql-queries": "^2.0.2-beta.8",
3435
"better-queue": "^3.8.6",
3536
"bluebird": "^3.5.0",

packages/gatsby/src/internal-plugins/load-babel-config/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ const addDefaultPluginsPresets = (
8686
name: `@babel/plugin-syntax-dynamic-import`,
8787
stage,
8888
})
89+
actions.setBabelPlugin({
90+
name: `babel-plugin-macros`,
91+
stage,
92+
})
8993
// Polyfills the runtime needed for async/await and generators
9094
actions.setBabelPlugin({
9195
name: `@babel/plugin-transform-runtime`,

yarn.lock

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2597,6 +2597,12 @@ babel-plugin-lodash@^3.2.11:
25972597
lodash "^4.17.10"
25982598
require-package-name "^2.0.1"
25992599

2600+
babel-plugin-macros@^2.4.0:
2601+
version "2.4.0"
2602+
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.0.tgz#6c5f9836e1f6c0a9743b3bab4af29f73e437e544"
2603+
dependencies:
2604+
cosmiconfig "^5.0.5"
2605+
26002606
babel-plugin-react-css-modules@^3.2.1:
26012607
version "3.4.2"
26022608
resolved "https://registry.yarnpkg.com/babel-plugin-react-css-modules/-/babel-plugin-react-css-modules-3.4.2.tgz#4c1db8d4bc8b2973f6c689da7dbd56b0cb8f099c"
@@ -4694,7 +4700,7 @@ cosmiconfig@^4.0.0:
46944700
parse-json "^4.0.0"
46954701
require-from-string "^2.0.1"
46964702

4697-
cosmiconfig@^5.0.0, cosmiconfig@^5.0.2:
4703+
cosmiconfig@^5.0.0, cosmiconfig@^5.0.2, cosmiconfig@^5.0.5:
46984704
version "5.0.5"
46994705
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.5.tgz#a809e3c2306891ce17ab70359dc8bdf661fe2cd0"
47004706
dependencies:
@@ -5621,6 +5627,14 @@ dom-serializer@0, dom-serializer@~0.1.0:
56215627
domelementtype "~1.1.1"
56225628
entities "~1.1.1"
56235629

5630+
dom-testing-library@^3.1.0:
5631+
version "3.1.0"
5632+
resolved "https://registry.yarnpkg.com/dom-testing-library/-/dom-testing-library-3.1.0.tgz#c9aecc4a6e506f456a03ffa3b344450fa046e6eb"
5633+
dependencies:
5634+
mutationobserver-shim "^0.3.2"
5635+
pretty-format "^22.4.3"
5636+
wait-for-expect "^0.4.0"
5637+
56245638
dom-urls@^1.1.0:
56255639
version "1.1.0"
56265640
resolved "https://registry.yarnpkg.com/dom-urls/-/dom-urls-1.1.0.tgz#001ddf81628cd1e706125c7176f53ccec55d918e"
@@ -10641,6 +10655,10 @@ multipipe@^0.1.2:
1064110655
dependencies:
1064210656
duplexer2 "0.0.2"
1064310657

10658+
mutationobserver-shim@^0.3.2:
10659+
version "0.3.2"
10660+
resolved "https://registry.yarnpkg.com/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#f4d5dae7a4971a2207914fb5a90ebd514b65acca"
10661+
1064410662
[email protected], mute-stream@~0.0.4:
1064510663
version "0.0.7"
1064610664
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
@@ -12568,6 +12586,13 @@ react-lifecycles-compat@^3.0.4:
1256812586
version "3.0.4"
1256912587
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
1257012588

12589+
react-testing-library@^4.1.7:
12590+
version "4.1.7"
12591+
resolved "https://registry.yarnpkg.com/react-testing-library/-/react-testing-library-4.1.7.tgz#1b13b8e38e2a66beea23d03326b3a143019d1d27"
12592+
dependencies:
12593+
dom-testing-library "^3.1.0"
12594+
wait-for-expect "^1.0.0"
12595+
1257112596
react@^16.4.1:
1257212597
version "16.4.1"
1257312598
resolved "https://registry.yarnpkg.com/react/-/react-16.4.1.tgz#de51ba5764b5dbcd1f9079037b862bd26b82fe32"
@@ -15718,6 +15743,14 @@ w3c-hr-time@^1.0.1:
1571815743
dependencies:
1571915744
browser-process-hrtime "^0.1.2"
1572015745

15746+
wait-for-expect@^0.4.0:
15747+
version "0.4.0"
15748+
resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-0.4.0.tgz#341c96ab89d6102a0169a9be6cd0de354de92c17"
15749+
15750+
wait-for-expect@^1.0.0:
15751+
version "1.0.0"
15752+
resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-1.0.0.tgz#edf2d5790c36dc67c4e21ac6ccedd7d4b79dc6ac"
15753+
1572115754
walker@~1.0.5:
1572215755
version "1.0.7"
1572315756
resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"

0 commit comments

Comments
 (0)