@zengenti/contensis-react-base 4.0.1-beta.1 → 4.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1469,7 +1469,7 @@ const webApp = (app, ReactApp, config) => {
|
|
|
1469
1469
|
|
|
1470
1470
|
// Render the JSX server side and send response as per access method options
|
|
1471
1471
|
if (!accessMethod.DYNAMIC) {
|
|
1472
|
-
store$1.runSaga(App.rootSaga(withSagas)).toPromise().then(() => {
|
|
1472
|
+
store$1.runSaga(App.rootSaga(withSagas)).toPromise().then(async () => {
|
|
1473
1473
|
var _selectCurrentSearch;
|
|
1474
1474
|
const reduxState = store$1.getState();
|
|
1475
1475
|
let clonedState = lodashClean.buildCleaner({
|
|
@@ -1549,6 +1549,13 @@ const webApp = (app, ReactApp, config) => {
|
|
|
1549
1549
|
let title = helmet.title.toString().includes('><') ? helmetAsync.title.toString() : helmet.title.toString();
|
|
1550
1550
|
const metadata = helmetAsync.meta.toString().concat(helmetAsync.base.toString()).concat(helmetAsync.priority.toString()).concat(helmetAsync.link.toString()).concat(helmetAsync.script.toString()).concat(helmetAsync.noscript.toString()).concat(helmet.meta.toString()).concat(helmet.base.toString()).concat(helmet.link.toString()).concat(helmet.script.toString()).concat(helmet.noscript.toString());
|
|
1551
1551
|
try {
|
|
1552
|
+
var _config$styles, _loadableExtractor$mo, _loadableExtractor$mo2;
|
|
1553
|
+
// Getting style tags generated by "CSS Modules" because they will be
|
|
1554
|
+
// available to loadable stats if we have built parts of the app with CSS
|
|
1555
|
+
// plugins that are not within styled-components
|
|
1556
|
+
// Render inline styles for CSS Modules if configured
|
|
1557
|
+
const cssModuleStyles = (_config$styles = config.styles) !== null && _config$styles !== void 0 && _config$styles.inline ? await (loadableExtractor === null || loadableExtractor === void 0 || (_loadableExtractor$mo = loadableExtractor.modern) === null || _loadableExtractor$mo === void 0 ? void 0 : _loadableExtractor$mo.getInlineStyleTags()) : loadableExtractor === null || loadableExtractor === void 0 || (_loadableExtractor$mo2 = loadableExtractor.modern) === null || _loadableExtractor$mo2 === void 0 ? void 0 : _loadableExtractor$mo2.getStyleTags();
|
|
1558
|
+
|
|
1552
1559
|
/**
|
|
1553
1560
|
* Loads all page assets into the provided templateHTML
|
|
1554
1561
|
*
|
|
@@ -1559,7 +1566,6 @@ const webApp = (app, ReactApp, config) => {
|
|
|
1559
1566
|
* if the context has requested a redirect
|
|
1560
1567
|
* */
|
|
1561
1568
|
const getContextHtml = (isFinal = false, styleTags, renderedJsxMarkup) => {
|
|
1562
|
-
var _loadableExtractor$mo;
|
|
1563
1569
|
if (context.url) {
|
|
1564
1570
|
response.redirect(context.statusCode || 302, context.url);
|
|
1565
1571
|
return '';
|
|
@@ -1574,18 +1580,13 @@ const webApp = (app, ReactApp, config) => {
|
|
|
1574
1580
|
// Set response.status from React StaticRouter
|
|
1575
1581
|
if (typeof context.statusCode === 'number') response.status(context.statusCode);
|
|
1576
1582
|
const bundleTags = isFinal ? getBundleTags(loadableExtractor, scripts, staticRoutePath) : '';
|
|
1577
|
-
|
|
1578
|
-
// Getting style tags generated by "CSS Modules" because they will be
|
|
1579
|
-
// available to loadable stats if we have built parts of the app with CSS
|
|
1580
|
-
// plugins that are not within styled-components
|
|
1581
|
-
const styles = loadableExtractor === null || loadableExtractor === void 0 || (_loadableExtractor$mo = loadableExtractor.modern) === null || _loadableExtractor$mo === void 0 ? void 0 : _loadableExtractor$mo.getStyleTags();
|
|
1582
1583
|
const html = replaceHtml({
|
|
1583
1584
|
bundleTags,
|
|
1584
1585
|
html: renderedJsxMarkup,
|
|
1585
1586
|
htmlAttributes,
|
|
1586
1587
|
metadata,
|
|
1587
1588
|
state: serialisedReduxData,
|
|
1588
|
-
styleTags: `${styleTags || ''}${
|
|
1589
|
+
styleTags: `${styleTags || ''}${cssModuleStyles || ''}`,
|
|
1589
1590
|
title,
|
|
1590
1591
|
templateHTML,
|
|
1591
1592
|
templateHTMLFragment,
|