From 4971fb292903b2dded66ecced023eddef2c3b770 Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Thu, 16 Jan 2025 11:10:22 -0500 Subject: [PATCH] fix:coep fixed cors by adding coep headless line to the webcontainer --- app/lib/webcontainer/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/lib/webcontainer/index.ts b/app/lib/webcontainer/index.ts index 38bb27f..7af2132 100644 --- a/app/lib/webcontainer/index.ts +++ b/app/lib/webcontainer/index.ts @@ -22,7 +22,11 @@ if (!import.meta.env.SSR) { import.meta.hot?.data.webcontainer ?? Promise.resolve() .then(() => { - return WebContainer.boot({ workdirName: WORK_DIR_NAME }); + return WebContainer.boot({ + coep: 'credentialless', + workdirName: WORK_DIR_NAME, + forwardPreviewErrors: true, // Enable error forwarding from iframes + }); }) .then((webcontainer) => { webcontainerContext.loaded = true;