Skip to content

Instantly share code, notes, and snippets.

@harshaktg
Created September 5, 2020 14:52
Show Gist options
  • Save harshaktg/ae4b288c1e81876892f0ca0ee36fc0c5 to your computer and use it in GitHub Desktop.
Save harshaktg/ae4b288c1e81876892f0ca0ee36fc0c5 to your computer and use it in GitHub Desktop.
singleSPA Config MFE
import { registerApplication, start } from 'single-spa'
registerApplication(
'vue',
() => import('./components/vue/index.js'),
() => location.pathname === "/vue" || location.pathname === "/" ? true : false
);
registerApplication(
'react',
() => import('./components/react/index.js'),
() => location.pathname === "/react" || location.pathname === "/" ? true : false
);
registerApplication(
'vanillajs',
() => import('./components/vanillajs/index.js'),
() => location.pathname === "/vanillajs" || location.pathname === "/" ? true : false
);
start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment