developit / nextjs-preact-demo

Next.js 9.3 + Preact = 21kB
https://nextjs-preact.now.sh
384 stars 25 forks source link

How to build without `next export` (using getStaticPaths `fallback: true`) #28

Open tomsoderlund opened 3 years ago

tomsoderlund commented 3 years ago

build is defined as "build": "next build && next export -o build" but it gives me the following build error:

Pages with `fallback` enabled in `getStaticPaths` can not be exported.
See more info here: https://err.sh/next.js/ssg-fallback-true-export

In a Next.js/React project I would just have:

"build": "next build"

but that gives this build error with Preact on Vercel:

Error: No Output Directory named "build" found after the Build completed.
You can configure the Output Directory in your Project Settings.
Learn More: https://vercel.link/missing-public-directory
marvinhagemeister commented 3 years ago

This sounds like the output directory is misconfigured in the project settings on vercel.