Skip to content

Commit

Permalink
fix: change extra scripts order and add style tag (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
crash7 authored Oct 10, 2019
1 parent f7ccc21 commit 3ccf975
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/server/src/Document.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ export function DocumentComponent({
{helmet.title.toComponent()}
{helmet.meta.toComponent()}
{helmet.link.toComponent()}
{extraHeadTags.map(renderTags)}
{helmet.style.toComponent()}
{helmet.script.toComponent()}
{extractor && getHeaderTags(extractor)}
{criticalCSS !== false && criticalCSS}
{clientCss && <link rel="stylesheet" href={clientCss} />}
{extraHeadTags.map(renderTags)}
</head>
<body {...bodyAttrs}>
{error ? (
Expand Down
9 changes: 9 additions & 0 deletions packages/server/src/Document.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ test('should render the server-app-state', () => {
script: {
toComponent: jest.fn()
},
style: {
toComponent: jest.fn()
},
htmlAttributes: {
toComponent: jest.fn()
},
Expand Down Expand Up @@ -67,6 +70,9 @@ test('should filter the server-app-state with the given function', () => {
script: {
toComponent: jest.fn()
},
style: {
toComponent: jest.fn()
},
htmlAttributes: {
toComponent: jest.fn()
},
Expand Down Expand Up @@ -136,6 +142,9 @@ test('should render the extra html tags in the `head`', () => {
script: {
toComponent: jest.fn()
},
style: {
toComponent: jest.fn()
},
htmlAttributes: {
toComponent: jest.fn()
},
Expand Down

0 comments on commit 3ccf975

Please sign in to comment.