Next.js Discord

Discord Forum

next.config adjust the build path for deployment (Help)

Unanswered
Norwegian Forest Cat posted this in #help-forum
Open in Discord
Norwegian Forest CatOP
Hi, I have my Next 13 application running on http://mydomain.com/my-app

And I have another frontend running at
http://mydomain.com

The problem that I am having is that I can see the styling and all the logic is trying to be fetched at
http://mydomain.com/_next/etc...
whereas I need it to get the build from
http://mydomain.com/my-app/_next/etc...

I thought this would have been a simply solve by adding basePath: '/my-app'
to my next.config.

I have also tried assetPath and distDir

but non of these configs is making next point at the actual build file (.next) in the correct location.

How can I get this to work?

0 Replies