NuxtN
Nuxt2mo ago
4 replies
emretinaztepe

Nuxt Dev & Durable Objects support

Hi Everyone,

I have been struggling to find an answer to this problem for months now and decided to ask your ideas.

How can I export my Durable Object class when running Nuxt in dev mode? I was able to accomplish this in Nuxt Preview/Build by defining a worker.ts entry file and pointing my Wrangler's main to this file as it simply imports Nuxt's index.mjs to re-export it alongside my Durable Object class.

However, in dev mode, index.mjs file is not generated, and I can't find a way to export my Durable Object class for Wrangler to use.

Even though I can test my project in Preview mode, it takes too much time to build, and I can't benefit from the Nitro Dev preset features such as HMR.

Any help is appreciated.
Was this page helpful?