We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccc43ec commit 18d79d3Copy full SHA for 18d79d3
package.json
@@ -27,7 +27,6 @@
27
"license": "MIT",
28
"dependencies": {
29
"@babel/runtime": "^7.12.5",
30
- "@babel/traverse": "^7.12.9",
31
"cosmiconfig": "^7.0.0",
32
"resolve": "^1.19.0"
33
},
src/index.js
@@ -1,6 +1,5 @@
1
const p = require('path')
2
const resolve = require('resolve')
3
-const traverse = require('@babel/traverse').default
4
// const printAST = require('ast-pretty-print')
5
6
const macrosRegex = /[./]macro(\.c?js)?$/
@@ -232,7 +231,7 @@ function applyMacros({
232
231
*
233
* See: https://github.com/kentcdodds/import-all.macro/issues/7
234
*/
235
- traverse(state.file.ast, {
+ state.file.scope.path.traverse({
236
Identifier() {},
237
})
238
0 commit comments