Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Promise.resolve(initialize()).then(app => {
if (!(app instanceof BaseApp)) {
throw new Error('Application entry point did not return an App');
}
if (window.__ROUTE_PREFIX__) {
// No-op plugin so token can be registered without any consumers
// Should not be needed when route prefixing is refactored into a separate plugin
app.register(
createPlugin({
deps: {routePrefix: RoutePrefixToken.optional},
})
);
app.register(RoutePrefixToken, window.__ROUTE_PREFIX__);
}
app.callback().call();
});
}
chunks,
runtimeChunkIds,
initialChunkIds, // $FlowFixMe
} from '../build/loaders/chunk-manifest-loader.js!'; // eslint-disable-line
/*::
import type {SSRBodyTemplateDepsType, SSRBodyTemplateType} from './types.js';
declare var __webpack_public_path__: string;
*/
/* eslint-disable-next-line */
const SSRBodyTemplate = createPlugin/*:: */(
{
deps: {
criticalChunkIds: CriticalChunkIdsToken.optional,
routePrefix: RoutePrefixToken.optional,
},
provides: ({criticalChunkIds, routePrefix}) => {
return ctx => {
const {htmlAttrs, bodyAttrs, title, head, body} = ctx.template;
const safeAttrs = Object.keys(htmlAttrs)
.map(attrKey => {
return ` ${escape(attrKey)}="${escape(htmlAttrs[attrKey])}"`;
})
.join('');
const safeBodyAttrs = Object.keys(bodyAttrs)
.map(attrKey => {
return ` ${escape(attrKey)}="${escape(bodyAttrs[attrKey])}"`;
})
.join('');
initialChunkIds, // $FlowFixMe
} from '../build/loaders/chunk-manifest-loader.js!'; // eslint-disable-line
import modernBrowserVersions from '../build/modern-browser-versions.js';
/*::
import type {SSRBodyTemplateDepsType, SSRBodyTemplateType} from './types.js';
declare var __webpack_public_path__: string;
*/
/* eslint-disable-next-line */
const SSRBodyTemplate = createPlugin/*:: */(
{
deps: {
criticalChunkIds: CriticalChunkIdsToken.optional,
routePrefix: RoutePrefixToken.optional,
},
provides: ({criticalChunkIds, routePrefix}) => {
return ctx => {
const {htmlAttrs, bodyAttrs, title, head, body} = ctx.template;
const safeAttrs = Object.keys(htmlAttrs)
.map(attrKey => {
return ` ${escape(attrKey)}="${escape(htmlAttrs[attrKey])}"`;
})
.join('');
const safeBodyAttrs = Object.keys(bodyAttrs)
.map(attrKey => {
return ` ${escape(attrKey)}="${escape(bodyAttrs[attrKey])}"`;
})
.join('');