fix(site): fix import path issue (#55223)

Co-authored-by: 遇见同学 <1875694521@qq.com>
This commit is contained in:
lijianan
2025-10-04 16:28:06 +08:00
committed by GitHub
parent 3fcd6c8573
commit fce28d79af

View File

@@ -1,4 +1,4 @@
import { format } from '@prettier/sync';
import prettierSync from '@prettier/sync';
import * as ts from 'typescript';
/**
@@ -31,7 +31,7 @@ export default function tsToJs(tsCode: string): string {
try {
// 使用 Prettier 同步格式化代码
const formatted = format(result.outputText, {
const formatted = prettierSync.format(result.outputText, {
// Prettier 格式化选项
parser: 'babel',
printWidth: 100,