I want to deploy a next.js app to a named folder instead of the root folder, as in
https://example.com/app
There seems to be a problem with routing when I place the app there, so I am looking into this config
next.config.mjs
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: '/app',
}
export default nextConfig
It works when in dev using http://localhost:3000/app but the images are not found, do I really have to now always add app
. Is there a better way?
<Image
src='app/next.svg'
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>