Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import 'atag';
import { render as raxRender, createElement } from 'rax';
import BrowserDriver from 'driver-browser';
import createHashHistory from 'history/createHashHistory';
import UniversalRouter from 'universal-router';
import { resolve } from './path';
import Container from './components/Container';
import ErrorPage from './components/ErrorPage';
import PagesManager from './PagesManager';
try {
BrowserDriver.setTagNamePrefix('a-');
} catch (e) {
BrowserDriver.setTagPrefix('a-');
}
export default {
/**
* Render App from manifest source.
*
* @param {object} manifest project manifest data
* @param {object} pagesMap map of pages
* @param {string} pagesMap.key page name
* @param {function} pagesMap.value page component
* @example
* render({name: "demo"}, { home: HomeComponent })
*/
render(manifest, pagesMap) {
import 'atag';
import { render as raxRender, createElement } from 'rax';
import BrowserDriver from 'driver-browser';
import createHashHistory from 'history/createHashHistory';
import UniversalRouter from 'universal-router';
import { resolve } from './path';
import Container from './components/Container';
import ErrorPage from './components/ErrorPage';
import PagesManager from './PagesManager';
try {
BrowserDriver.setTagNamePrefix('a-');
} catch (e) {
BrowserDriver.setTagPrefix('a-');
}
export default {
/**
* Render App from manifest source.
*
* @param {object} manifest project manifest data
* @param {object} pagesMap map of pages
* @param {string} pagesMap.key page name
* @param {function} pagesMap.value page component
* @example
* render({name: "demo"}, { home: HomeComponent })
*/
render(manifest, pagesMap) {
const manifestPages = manifest.pages;
const pageManager = new PagesManager(manifestPages);