function generateClientManifest(assetMap) {
  let clientManifest = {};
  const appDependencies = new Set(assetMap.pages["/_app"]);

  Object.entries(assetMap.pages).forEach(([page, files]) => {
    if (page === "/_app") return;

    const filteredDeps = files.filter((file) => !appDependencies.has(file));

    clientManifest[page] = filteredDeps;
  });

  return JSON.stringify(clientManifest);
}
Take an asset map and generate a client version with just pages to be used for
client page routing, loading and transitions.

@param {object} assetMap