@vercel/microfrontends 2.1.1 → 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,22 +1666,18 @@ 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
1679
  missing: [
1679
- { type: "header", key: "x-vercel-mfe-local-proxy-origin" },
1680
- {
1681
- type: "host",
1682
- value: `localhost:${microfrontend.getLocalProxyPort()}`
1683
- // if it's already on the host, we don't need to redirect
1684
- }
1680
+ { type: "header", key: "x-vercel-mfe-local-proxy-origin" }
1685
1681
  ]
1686
1682
  }
1687
1683
  ];