fix: prototype to import declaration (#67)

Co-authored-by: wwsun <ww.sww@outlook.com>
This commit is contained in:
Wells
2023-11-22 20:00:32 +08:00
committed by GitHub
parent 630c486eb8
commit 8a1234e565
+3
View File
@@ -35,6 +35,9 @@ export function getImportDeclarationPayloadByPrototype(
if (relativeFilepath && isFilepath(sourcePath)) {
sourcePath = getRelativePath(relativeFilepath, sourcePath);
}
if (sourcePath.endsWith('.js')) {
sourcePath = sourcePath.slice(0, -3);
}
return {
defaultSpecifier,