You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrangler probably won't work inside the playground, you will need to clone locally.
Run NITRO_PRESET=cloudflare_pages pnpm run build to build the server.
Then run npx wrangler pages dev dist/
The page will have an error about WeakRef not being defined.
Describe the bug
WeakRef is not supported in Cloudflare Workers currently.
That makes it impossible to run this plugin with Nuxt SSR.
Environment
playground
Reproduction
https://stackblitz.com/edit/nuxt-starter-wgz5jk?file=app.vue
Wrangler probably won't work inside the playground, you will need to clone locally.
Run
NITRO_PRESET=cloudflare_pages pnpm run build
to build the server.Then run
npx wrangler pages dev dist/
The page will have an error about WeakRef not being defined.
Describe the bug
WeakRef is not supported in Cloudflare Workers currently.
That makes it impossible to run this plugin with Nuxt SSR.
Additional context
Workaround:
You can polyfill this by making a
plugins/weakref-polyfill.server.ts
file and adding the contents of https://github.com/jaenster/weakref-pollyfill/blob/master/src/index.js.Don't forget to add
export default defineNuxtPlugin(() => {})
at the end or it will be ignored at build time.You may consider polyfilling WeakRef in this package, but it is probably out of scope for this library.
I hope that is the last of my issues with this library for a while :)
Logs
No response
The text was updated successfully, but these errors were encountered: