contentlayerdev / contentlayerdev/next-contentlayer-example

Example does not run on vercel edge?

Aperta
#23 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
104
Fork
37
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Here is the repo:
https://github.com/yongyi520/contentlayer-example

I have cloned this repo and simply added
`export const runtime = 'edge' // 'nodejs' (default) | 'edge'`

on all pages

When I tried to deploy it to vercel, I got this issue:
**EvalError: Code generation from strings disallowed for this context**
![Screenshot 2023-09-09 at 14 31 39](https://github.com/contentlayerdev/next-contentlayer-example/assets/10789851/1c8752d9-8842-4473-a427-7b18db36531a)

Everything works fine on nodejs serverless, but when it's on edge it throws error somehow

Is there a workaround for this?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.