Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] SPA 構成でデプロイできるようにする #69

Closed
wants to merge 1 commit into from

Conversation

k-miyake
Copy link
Collaborator

ハンズオン当日のデプロイバックアップ先として GitHub Pages 等の静的ホスティングで実行できるかどうかを検証しておく。

@k-miyake
Copy link
Collaborator Author

@ubugeeei pnpm generate しただけでは起動しないようです。
画面上は Initializing WebContainer から先に進まず、ブラウザの Console では以下の例外が出ていました。

webcontainer.e7ca9335.js:1 Uncaught (in promise) DataCloneError: Failed to execute 'postMessage' on 'Worker': SharedArrayBuffer transfer requires self.crossOriginIsolated.
    at iframe.main.e7ca9335.js:1:75783
    at new Promise (<anonymous>)
    at _0x3169b5 (iframe.main.e7ca9335.js:1:75085)
    at Object.apply (iframe.main.e7ca9335.js:1:73217)
    at _0x4be0fb.init (iframe.main.e7ca9335.js:4:37654)

@ubugeeei
Copy link
Member

なるほど,Worker...?

@ubugeeei
Copy link
Member

@ubugeeei
Copy link
Member

@ubugeeei
Copy link
Member

@k-miyake

COOP/COEP headers を設定しないといけないみたいです.

https://webcontainers.io/guides/configuring-headers

GitHub Pages で設定ができるのか軽く確認して欲しいかもです

@ubugeeei
Copy link
Member

ubugeeei commented Sep 23, 2024

netlify, cloudflare あたりはできるらしい

https://webcontainers.io/guides/configuring-headers#cloudflare

Nuxt の設定もあるけどこれは SSG の時には効くのか...? (効かなそう)

https://webcontainers.io/guides/configuring-headers#nuxt-3

@k-miyake
Copy link
Collaborator Author

@ubugeeei GitHub Pages には設定する場所がなさそうなので、素の Cloudflare Pages 等で試してみます。

@k-miyake k-miyake closed this Oct 19, 2024
@ubugeeei ubugeeei deleted the deploy/non-nuxthub branch October 21, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants