File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export function useWorkspaceFileContent(
103103
104104async function fetchWorkspaceFileBinary ( key : string , signal ?: AbortSignal ) : Promise < ArrayBuffer > {
105105 const serveUrl = `/api/files/serve/${ encodeURIComponent ( key ) } ?context=workspace`
106- const response = await fetch ( serveUrl , { signal } )
106+ const response = await fetch ( serveUrl , { signal, cache : 'no-store' } )
107107 if ( ! response . ok ) throw new Error ( 'Failed to fetch file content' )
108108 return response . arrayBuffer ( )
109109}
Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ export async function generatePptxFromCode(
7272 else resolve ( result as Buffer )
7373 }
7474
75+ if ( signal ?. aborted ) {
76+ reject ( new Error ( 'PPTX generation cancelled' ) )
77+ return
78+ }
79+
7580 signal ?. addEventListener ( 'abort' , ( ) => done ( new Error ( 'PPTX generation cancelled' ) ) , {
7681 once : true ,
7782 } )
Original file line number Diff line number Diff line change @@ -93,9 +93,10 @@ const nextConfig: NextConfig = {
9393 '/*' : [
9494 './node_modules/sharp/**/*' ,
9595 './node_modules/@img/**/*' ,
96- // pptxgenjs is required by the PPTX worker subprocess at runtime.
97- // It has no static import that Next.js can trace, so we include it explicitly.
96+ // pptxgenjs and the PPTX worker are required at runtime by the subprocess .
97+ // Neither has a static import that Next.js can trace, so we include them explicitly.
9898 './node_modules/pptxgenjs/**/*' ,
99+ './lib/execution/pptx-worker.cjs' ,
99100 ] ,
100101 } ,
101102 experimental : {
You can’t perform that action at this time.
0 commit comments