Browse Source

fix(dashboard): Clear temp dir on compilation

Michael Bromley 3 tháng trước cách đây
mục cha
commit
a0bbe09895
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      packages/dashboard/vite/utils/compiler.ts

+ 3 - 0
packages/dashboard/vite/utils/compiler.ts

@@ -47,6 +47,9 @@ export async function compile(options: CompilerOptions): Promise<CompileResult>
     const transformTsConfigPathMappings =
         pathAdapter?.transformTsConfigPathMappings ?? defaultPathAdapter.transformTsConfigPathMappings;
 
+    // 0. Clear the outputPath
+    fs.removeSync(outputPath);
+
     // 1. Compile TypeScript files
     const compileStart = Date.now();
     await compileTypeScript({