Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function render(req, res, next, assetManifest, chunkManifest) {
axios.defaults.baseURL = `http://${req.clientConfig.host}:${req.clientConfig.port}`;
let styles = '';
let scripts = `
`;
const isProd = process.env.NODE_ENV === 'production';
if(isProd) {
styles = `
`;
scripts = `
`
}
const history = createMemoryHistory();
const authenticated = false;
//const authenticated = req.isAuthenticated();
const user = null;
/*storeInitialState.user.authenticated = authenticated;
//eslint-disable-next-line
const manifest = require("../../dist/client/manifest.json");
const vendorCss = [manifest["vendors.css"], manifest["browser.css"]];
const vendorJs = [manifest["vendors.js"], manifest["browser.js"]];
export default ({ html, preState, helmet, bundles }) => {
let styles = bundles.filter(bundle => bundle.file.endsWith(".css"));
let scripts = bundles.filter(bundle => bundle.file.endsWith(".js"));
return `