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
I have searched existing issues to ensure the issue has not already been raised
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:
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?
The text was updated successfully, but these errors were encountered:
Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.
Take a look at the part of the docs that mention "assets serving".
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: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 nextjspublic
folder to work like it does in a normal nextjs setup?The text was updated successfully, but these errors were encountered: