capstone-design-root.js 686 Bytes
import { registerApplication, start } from "single-spa";

registerApplication({
  name: "@capstone-design/navbar",
  app: () => System.import("@capstone-design/navbar"),
  activeWhen: ["/"],
});

registerApplication({
  name: "@capstone-design/news",
  app: () => System.import("@capstone-design/news"),
  activeWhen: [(location) => location.pathname === "/"],
});

registerApplication({
  name: "@capstone-design/comment",
  app: () => System.import("@capstone-design/comment"),
  activeWhen: ["/"],
});

registerApplication({
  name: "@capstone-design/recommend",
  app: () => System.import("@capstone-design/recommend"),
  activeWhen: ["/"],
});

start({
  urlRerouteOnly: true,
});