Prerequisites
Issue
Maybe I am misinterpreting how this all comes together, but I am using the fastify-nextjs plugin to serve pages from the /src/pages folder... Example: /src/pages/payment-options.js with a route defined like so:
await app.register(fastifyNextJs).after(async () => {
await app.next('/payment-options');
});
That route works fine... That said, I tried creating a public folder at the root of my project as is allowed by NextJS for serving static assets (html, css, js, text, images, etc) and I cannot access the URL via a web browser.
created file:
/public/styles.css
Tried to access via browser at http://localhost/styles.css and I get the standard fastify route doesn't exist 404 error...
{"message":"Route GET:/styles.css not found","error":"Not Found","statusCode":404} in the browser.
Does the fastify-nextjs not allow the nextjs public folder to work like it does in a normal nextjs setup?
Prerequisites
Issue
Maybe I am misinterpreting how this all comes together, but I am using the
fastify-nextjsplugin to serve pages from the/src/pagesfolder... Example:/src/pages/payment-options.jswith a route defined like so:That route works fine... That said, I tried creating a
publicfolder at the root of my project as is allowed by NextJS for serving static assets (html, css, js, text, images, etc) and I cannot access the URL via a web browser.created file:
/public/styles.cssTried to access via browser at
http://localhost/styles.cssand I get the standard fastify route doesn't exist 404 error...{"message":"Route GET:/styles.css not found","error":"Not Found","statusCode":404}in the browser.Does the
fastify-nextjsnot allow the nextjspublicfolder to work like it does in a normal nextjs setup?