Skip to content

Commit 6d42091

Browse files
committed
fix: explicitly set the parser to babylon
Avoid the `ImportExpression` error in older versions of ast-types & recast.
1 parent fd4e13b commit 6d42091

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

generator/codemods/global-api/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ module.exports = function(fileInfo, api) {
2121
return root.toSource({ lineTerminator: '\n' })
2222
}
2323

24+
module.exports.parser = 'babylon'

generator/codemods/router/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,5 @@ module.exports = function(fileInfo, api) {
6161

6262
return root.toSource({ lineTerminator: '\n' })
6363
}
64+
65+
module.exports.parser = 'babylon'

generator/codemods/vuex/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ module.exports = function(fileInfo, api) {
6565

6666
return root.toSource({ lineTerminator: '\n' })
6767
}
68+
69+
module.exports.parser = 'babylon'

0 commit comments

Comments
 (0)