diff --git a/astro-fastify-ssg/server.js b/astro-fastify-ssg/server.js index 1f66e4f..6a0f0ae 100644 --- a/astro-fastify-ssg/server.js +++ b/astro-fastify-ssg/server.js @@ -7,7 +7,9 @@ const app = async (fastify, opts) => { if (opts.dev) { const astro = await import("astro"); - const astroDevServer = await astro.dev(); + const astroDevServer = await astro.dev({ + root: fileURLToPath(import.meta.resolve(".")), + }); await fastify.register(await import("@fastify/http-proxy"), { upstream: `http://localhost:${astroDevServer.address.port}`, }); diff --git a/astro-fastify/server.js b/astro-fastify/server.js index ae84a5f..c52a06f 100644 --- a/astro-fastify/server.js +++ b/astro-fastify/server.js @@ -8,7 +8,9 @@ const app = async (fastify, opts) => { if (opts.dev) { const astro = await import("astro"); - const astroDevServer = await astro.dev(); + const astroDevServer = await astro.dev({ + root: fileURLToPath(import.meta.resolve(".")), + }); await fastify.register(await import("@fastify/http-proxy"), { upstream: `http://localhost:${astroDevServer.address.port}`, });