fix(compiler-sfc): should not remove import statements with no specifier when compiling script setup
This commit is contained in:
@@ -638,7 +638,7 @@ export function compileScript(
|
||||
)
|
||||
}
|
||||
}
|
||||
if (removed === node.specifiers.length) {
|
||||
if (node.specifiers.length && removed === node.specifiers.length) {
|
||||
s.remove(node.start! + startOffset, node.end! + startOffset)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user