@vercel/microfrontends 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1666,16 +1666,19 @@ function routeToLocalProxy() {
1666
1666
 
1667
1667
  // src/next/config/transforms/redirects.ts
1668
1668
  function transform4(args) {
1669
- const { next, microfrontend, opts } = args;
1669
+ const { next, microfrontend, opts, app } = args;
1670
1670
  const isProduction2 = opts?.isProduction ?? false;
1671
1671
  const requireLocalProxyHeader = routeToLocalProxy() && !isProduction2 && !process.env.MFE_DISABLE_LOCAL_PROXY_REWRITE;
1672
1672
  if (requireLocalProxyHeader) {
1673
+ const assetPrefix = app.getAssetPrefix();
1673
1674
  const proxyRedirects = [
1674
1675
  {
1675
- source: "/:path*",
1676
+ source: `/((?!${assetPrefix ? `${assetPrefix}/` : ""}_next/static).*)`,
1676
1677
  destination: `http://localhost:${microfrontend.getLocalProxyPort()}/:path*`,
1677
1678
  permanent: false,
1678
- missing: [{ type: "header", key: "x-vercel-mfe-local-proxy-origin" }]
1679
+ missing: [
1680
+ { type: "header", key: "x-vercel-mfe-local-proxy-origin" }
1681
+ ]
1679
1682
  }
1680
1683
  ];
1681
1684
  if (next.redirects && typeof next.redirects === "function") {