mirror of
https://github.com/NetEase/tango.git
synced 2026-08-28 17:41:30 +08:00
fix: prototype to import declaration (#67)
Co-authored-by: wwsun <ww.sww@outlook.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user