@@ -17,7 +17,8 @@ export function insertBefore(nodes) {
|
||||
if (
|
||||
this.parentPath.isExpressionStatement() ||
|
||||
this.parentPath.isLabeledStatement() ||
|
||||
this.parentPath.isExportDeclaration()
|
||||
this.parentPath.isExportNamedDeclaration() ||
|
||||
(this.parentPath.isExportDefaultDeclaration() && this.isDeclaration())
|
||||
) {
|
||||
return this.parentPath.insertBefore(nodes);
|
||||
} else if (
|
||||
@@ -98,7 +99,8 @@ export function insertAfter(nodes) {
|
||||
if (
|
||||
this.parentPath.isExpressionStatement() ||
|
||||
this.parentPath.isLabeledStatement() ||
|
||||
this.parentPath.isExportDeclaration()
|
||||
this.parentPath.isExportNamedDeclaration() ||
|
||||
(this.parentPath.isExportDefaultDeclaration() && this.isDeclaration())
|
||||
) {
|
||||
return this.parentPath.insertAfter(nodes);
|
||||
} else if (
|
||||
|
||||
Reference in New Issue
Block a user