Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
// If react-router is redirecting, do it on the server side
if (context.url) {
return res.redirect(301, context.url);
}
// create a "header" stream
const headerStream = readable();
// create a style steam
const styledStream = createStyleStream(projectStyles, (style) => {
// emit a line to header Stream
headerStream.push(`\n`);
});
// allow client to start loading js bundle
res.write(``);
const middleStream = readableString('<div id="app">');
const endStream = readableString('</div>');
const streams = [
headerStream,
middleStream,
styledStream,
endStream,
];