#Multizone not working properly in dev server

1 messages · Page 1 of 1 (latest)

trim night
#

The config in main app


/** @type {import('next').NextConfig} */
const nextConfig = {
  output: "standalone",
  async rewrites() {
    console.log("BLOG_URL", BLOG_URL);
    return {
      afterFiles: [
        {
          source: "/blog",
          destination: `${BLOG_URL}/blog`,
        },
        {
          source: "/blog/:path*",
          destination: `${BLOG_URL}/blog/:path*`,
        },
        {
          source: "/:path*",
          destination: `/:path*`,
        },
      ],
    };
  },
};

export default nextConfig;

The config in blog app

const nextConfig = {
  basePath: "/blog",
};

export default nextConfig;

The rerouting to blog app is working only after refreshing in dev server but working properly in production build

muted pivotBOT
#

Hi @trim night. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the knowledge sources provided, it seems that there have been issues reported with multi-zone functionality in Next.js in development mode. Specifically, there have been reports of infinite refreshes when navigating to apps under rewrite rules in the development environment. This issue has been reported in multiple versions of Next.js, including 13.4.19, 13.4.13, and even in version 14.

Here is an example of a similar issue reported on GitHub: Multi-zone not working on version 13.4.19. 13.4.3 works fine (https://github.com/vercel/next.js/issues/54454).

In this issue, the user reported that downgrading to version 13.4.3 resolved the problem. However, other users reported similar problems in version 13.4.3 and 14.0.2.

Unfortunately, without more information, it's hard to provide a definitive solution. You may want to try downgrading to a version that works for you, or check the Next.js GitHub issues for any updates or potential fixes.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@trim night kapa.ai is still learning and improving, please let us know how it did by reacting below