Skip to content

syncDrupalPreviewRoutes bundle size #397

Open
@dottodot

Description

@dottodot

I've noticed that if I add syncDrupalPreviewRoutes in my app.tsx my bundle size is increased by about 100kb however if I just include the function in my app.tsx sync still functions

function syncDrupalPreviewRoutes(path) {
  if (window && window.top !== window.self) {
    window.parent.postMessage(
      { type: 'NEXT_DRUPAL_ROUTE_SYNC', path },
      process.env.NEXT_PUBLIC_DRUPAL_BASE_URL
    );
  }
}

Router.events.on('routeChangeStart', function (path) {
  syncDrupalPreviewRoutes(path);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions