export function genActiveRule(routerPrefix) {
  return location => location.pathname.startsWith(routerPrefix);
}
export default {
  dev: [
    {
      name: 'web4_console',
      entry: `//${window.location.hostname}:3020/civweb4`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb4'),
      props: {},
    },
    {
      name: 'civmanage',
      entry: `//${window.location.hostname}:8081/civbase/civmanage`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civmanage'),
    },
  ],
  prod: [
    {
      name: 'web4_console',
      entry: `//${window.location.host}/civweb4`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb4'),
      props: {},
    },
  ],
};
