oncss 1.0.5 → 1.0.6
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/package.json +1 -1
- package/readme.md +4 -5
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -260,10 +260,9 @@ const App = () => (
|
|
|
260
260
|
// Render the component to a string
|
|
261
261
|
const html = ReactDOMServer.renderToString(<App />);
|
|
262
262
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
.join('\n');
|
|
263
|
+
let styles: any = Array.from(CSSFactory.values()).map((style) => {
|
|
264
|
+
return `<style data-oncss="${style.classname}">${style.css}</style>`
|
|
265
|
+
});
|
|
267
266
|
|
|
268
267
|
// Inject the styles into the HTML
|
|
269
268
|
const fullHtml = `
|
|
@@ -273,7 +272,7 @@ const fullHtml = `
|
|
|
273
272
|
<meta charset="UTF-8">
|
|
274
273
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
275
274
|
<title>SSR with oncss</title>
|
|
276
|
-
|
|
275
|
+
${styles}
|
|
277
276
|
</head>
|
|
278
277
|
<body>
|
|
279
278
|
<div id="root">${html}</div>
|