micor.js 929 Bytes
Newer Older
邓晓峰's avatar
邓晓峰 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
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: 'civweb5',
      entry: `//${window.location.hostname}:3008/civbase/civweb5`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb5'),
    },
  ],
  prod: [
    {
      name: 'web4_console',
      entry: `//${window.location.host}/civweb4`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb4'),
      props: {},
    },
    {
      name: 'civweb5',
      entry: `//${window.location.host}/civweb5`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb5'),
    },
  ],
};