fix: cors issues

fixed cors by adding coep headless line to the webcontainer
This commit is contained in:
Dustin Loring
2025-01-16 11:41:13 -05:00
committed by GitHub

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;