fixed cors by adding coep headless line to the webcontainer
This commit is contained in:
Dustin Loring 2025-01-16 11:10:22 -05:00
parent bc5b798760
commit 4971fb2929

View File

@ -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;