fix(update): fresh/runtime import specifier updated incorrectly (#3009)
…ports The original code is shown in the following figure, and there is an incorrect usage in it. 
This commit is contained in:
@@ -313,7 +313,7 @@ async function updateFile(sourceFile: tsmorph.SourceFile): Promise<void> {
|
|||||||
if (!hasRuntimeImport && newImports.runtime.size > 0) {
|
if (!hasRuntimeImport && newImports.runtime.size > 0) {
|
||||||
sourceFile.addImportDeclaration({
|
sourceFile.addImportDeclaration({
|
||||||
moduleSpecifier: "fresh/runtime",
|
moduleSpecifier: "fresh/runtime",
|
||||||
namedImports: Array.from(newImports.core),
|
namedImports: Array.from(newImports.runtime),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (newImports.compat.size > 0) {
|
if (newImports.compat.size > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user