@norejs/ssr-server 0.0.1 → 0.0.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.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -51,7 +51,7 @@ module.exports = function SSRServer(config, envName, cb) {
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
} catch (error) {
|
|
54
|
-
console.log('error', error);
|
|
54
|
+
// console.log('error', error);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
return html;
|
|
@@ -77,9 +77,9 @@ module.exports = function SSRServer(config, envName, cb) {
|
|
|
77
77
|
.replace('</head>', `<style>${css}</style></head>`)
|
|
78
78
|
.replace(
|
|
79
79
|
'<div id="root">',
|
|
80
|
-
`<
|
|
80
|
+
`<script>window._INIT_STORE_STATE=${JSON.stringify(
|
|
81
81
|
initialState
|
|
82
|
-
)}</script>${appString}`
|
|
82
|
+
)}</script><div id="root">${appString}`
|
|
83
83
|
);
|
|
84
84
|
return res.send(data);
|
|
85
85
|
});
|